In my VB6 application I have an array of objects declared thus...
Dim MyArray() as MyClass
This array is filled in as processing goes on
Set MyArray(element) = passed_object
and as elements are no longer wanted,
Set MyArray(otherelement) = Nothing
When using the array, I want to use a loop like
For i = 1 To Ubound(MyArray)
If MyArray(i) <> Nothing Then ' Doesn't compile
...do something...
End If
Next i
But I can't get anything likely-looking to compile. I've also tried
If MyArray(i) Is Not Nothing Then
Should I want to do this, and if so, what test should I put in here?