I have a simple problem. I have the following code:
Sub test()
Dim vr() As String
ReDim vr(1)
vr(0) = 1
For i = 0 To UBound(vr)
Debug.Print (vr(i))
Next i
End Sub
Even though I have set the length of the array to one, the array actually has two positions:
vr(0) = 1
vr(1) = ""
Why does it have two positions even though I have set the length to one?