If i declare an Array as thus:
szString = Array("string1","string2",etc)
how do i call each string with....
for loops
Printable View
If i declare an Array as thus:
szString = Array("string1","string2",etc)
how do i call each string with....
for loops
There's two ways
Code:
Dim varTemp As Variant
For Each varTemp In szString
Msgbox varTemp
Next varTemp
Just pick whichever suits you better (The second one is slightly faster an gives you the index of the array)Code:Dim i As Integer
For i = LBound(szString) To UBound(szStrng)
Msgbox szString(i)
Next i
Many Thanks
YOu can use index as well with variant but it's still slightly slower i guess