Access Array by index
Sub ABC()
Dim Arr As Variant
ReDim Arr(1 To 10)
For i = 1 To 10
Arr(i) = Int(Rnd() * 100 + 1)
Next
For j = 1 To 10
msg = msg & Arr(j) & IIf(j < 10, ", ", "")
Next
MsgBox msg
End Sub
addresses an array using an index.
--
Regards,
Tom Ogivly
"Souris" wrote in message
...[i]
I wanted to accumulate the value in my array.
ARR as Variant
I need to check that does array have value before add to my accumulator.
I tried to access using ARR and ARR(i), but no of them works.
Any information is great appreciated,
|