mi********@gmail.com wrote:
Hello
Is there a way to get the index of an item in an array? For instance,
if I have:
MyArray = Array("NY","CT","TX","NM")
...can I see what position CT is in the array?
Thanks
If it were important I'd hack something up along these lines (it would
need some more work):
Dim MyArray As Variant
Dim tempString As String
MyArray = Array("NY", "CT", "TX", "NM")
tempString = "/" & Join(MyArray, "/") & "/"
Debug.Print UBound(Split(left(tempString, InStr(tempString, "/CT/")),
"/")) - 1
but ... why would it be important?