The array is going to be referenced by the index number of each string in the array. We use "m" as the numeric variable.
LBound(MyStrings) will return the index number of the first item in the array, this is usually 0 or 1. We could just USE 0 or 1 in this spot, but I'm lazy and don't bother to remember which types of arrays are 0-based and which are 1-based. So LBound to the rescue, does it for us.
UBound(MyStrings) will return the index number of the last item in the array. Since you have 32 items that number is going to be 31 for 0-based arrays, and 32 for 1-based arrays. LBound figures out which is correct so we don't have to.
This translates in the example given into either:
or
It works fine either way.
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
Bookmarks