Don't confuse the way autofilter used that array to how you would otherwise use that array.
Normally to refer to an item in an array you have to specify the index number of the item in the array to use that item.
Unless you have Option Base 1 at the top of your code module the array you create using Array("item","item2" will be a zero based array, meaning the first item has an index number of 0 and the second item will be 1 etc.
With Option Base 1 at the top of your code that array will use 1 for the first item 2 for the second etc.
Regardless of whether you have Option Base 1 or not, if you use VBA.Array("Item1","Item2" etc., for your array it will always be a 0 based array.
Play with the code below to understand what I am talking about.
With the first code the way it is you will get an error because there is no 0 indexed item in that array. Remove or comment out the Option Base 1 statement and see what the message box gives you. Try experimenting, change item number and see what happens, remove or comment out the Option Base 1 statement and you will see how it changes things.
LBound gets the number of the first item in an array regardless of the Option Base statement. It's immune to that, which is why people use it in code, it works regardless of whether Option Base 1 is in place or not. UBound gives the number of the last item in an array.
Bookmarks