Quote Originally Posted by winterslam
Code:
Private var() As Entity



Private Sub Form_Load()
ReDim var(1 To 5) As Entity
var(1).x = 5

End Sub
Run-time error '91':


Object varialbe or With block variable not set
You have to instantiate them first before you could use them...
Code:
Private Sub Form_Load()
    Dim a As Long
    ReDim Var(1 To 5) As Entity
    
    For a = LBound(Var) To UBound(Var)
        Set Var(a) = New Entity
    Next
    Var(1).x = 5

End Sub