Accessing array values

Joined
May 26, 2011
Messages
2
Reaction score
0
How is it that MsgBox (rangearray(i)) gives a value yet Reference:=(rangearray(i)) gives an error? I can get a value out using Reference:=(rangearray(1)) for example yet the point was to step through the array dynamically:
Code:
Sub test()
rangearray = Array("aa", "bb", "cc")
For i = 0 To UBound(rangearray)
    [B]Application.Goto Reference:=(rangearray(i))
[/B]    MsgBox (rangearray(i))
Next i
End Sub
 
Back
Top