This is hopefully an easy one, but i cant seem to find any reference to it.
How do i print the location of something stored in an array, not the actual item that is in it.
Array(0) = Dog
Array(1) = Cat
Array(2) = Fish
Lets say i searched the array and found cat, how do i print the location cat was stored at, in this case Index Number (1).
Thanks in advance.
Location of array is called
indexIf you run a loop,
LBound: is the Lower bound, the starting index of the array. The first. It can be zero or anything as VBA provides the flexibility of changing the default array base to be either 0 or 1.UBound: is the Upper bound, the ending index of the array. The last.For further reading: LBound and Ubound conflicts in case of array which has been assigned by the Range.