I have declared an array as
Dim weights As Variant
The following program to print works:
Dim item As Variant
For Each item In weights
Debug.Print item
Next item
But the following program prints nothing:
Dim i As Integer
For i = LBound(weights) To UBound(weights)
Debug.Print CStr(weights(i - 1))
Next i
Please help.
I need to access array elements by index