Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Objects (forms) in arrays
Message
From
20/06/2000 14:49:32
 
 
To
16/06/2000 13:43:43
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00381535
Message ID:
00382318
Views:
19
You got the error from the compiler or at runtime? If it's at the compiler level, you better post the code because you may have a syntax problem. Otherwise, here is what I do to check if an object has been instanciated correctly:
Dim loObj As MyObject.MyClass
Set loObj = Nothing
On Error Resume Next
Set loObj = New MyObject.MyClass
On Error GoTo 0

If loObj Is Nothing Then
   ' Error treatment goes here
Else
   ' OK, we may go on
End If
HTH
>My question is very simple: How can I check if an object has been set to Nothing? I already tried the obvious (i.e. "if myObject = Nothing then ...") but it didn't work because I'm not using the object correctly (at least, that's the message I got from the compiler).
Previous
Reply
Map
View

Click here to load this message in the networking platform