-
Dim F as Form
.
.
.
Set F = frmSomeForm
If I do a quick watch on F prior to the set statement being executed, vb tells me the value of F is Nothing. However if I attempt to code:
If F = Nothing then
.
.
.
End If
I get an "Invalid use of object error message". How would I test if the set statement has been executed (i.e. F has been instantiated)?
-
That is almost right, we use Is with objects though
Code:
If Not myObject Is Nothing Then
'then the object exists
Else
'It is not initiated
End If
-
Thanks a bunch!
(I should have known/thought of that!)