How to test if an object equals nothing 
Author Message
 How to test if an object equals nothing

Hi CLBMers,
(Pardon the scatological humor)
<Environment: Micro$oft VB5.0>
I need to test if an object is equal to nothing.
I have a property that returns nothing into my object
if that property encounters an error. However when I
try the code below, I get "Compile error: Invalid use
of object"


TIA, Howard Rubin

Dim obj1 as MyLib.workspace
Set obj1 = new MyLib.workspace
Dim obj2 as MyLib.Instance
Set obj2 = obj1.Connect

If obj2 = Nothing Then          ' <- VB Compile error
        Exit Sub
End If



Fri, 10 Dec 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. How to test if an object equals nothing

2. Testing an Object equal to Nothing

3. Determining If An Object Is Equal To Nothing

4. ADO Connection Object Close and set it equal to nothing

5. Setting objects equal to Nothing-- when to do?

6. Testing nothing objects

7. Testing for object set to Nothing - Please help!

8. Testing whether object = nothing

9. Test see if object = nothing

10. Test object for "Nothing"

11. Object = Nothing type test...

12. How to test is an object = NOTHING

 

 
Powered by phpBB® Forum Software