Is object set to Nothing? 
Author Message
 Is object set to Nothing?

If your_object_var Is Nothing Then
    'do whatever
End If

Conversely, to test that it has a legit value...

    If Not your_object_var Is Nothing Then

--
Alan Rueckgauer
Rueckgauer Systems
Windows NT & Internet Solutions
www.rueckgauer.com

=====

Quote:

>Does anybody know how to check whether
>object variable was set or it was "nothing"?

>I need something like this:

>if <object_var>=nothing then
> ....
>end if

>Thanks
>Andrew Twer



Mon, 23 Apr 2001 03:00:00 GMT  
 Is object set to Nothing?
Does anybody know how to check whether
object variable was set or it was "nothing"?

I need something like this:

if <object_var>=nothing then
 ....
end if

Thanks
Andrew Twer



Tue, 24 Apr 2001 03:00:00 GMT  
 Is object set to Nothing?
Thanks a lot, it runs great!
Andrew Tver
Quote:

> If your_object_var Is Nothing Then
>     'do whatever
> End If

> Conversely, to test that it has a legit value...

>     If Not your_object_var Is Nothing Then

> --
> Alan Rueckgauer
> Rueckgauer Systems
> Windows NT & Internet Solutions
> www.rueckgauer.com

> =====

> >Does anybody know how to check whether
> >object variable was set or it was "nothing"?

> >I need something like this:

> >if <object_var>=nothing then
> > ....
> >end if

> >Thanks
> >Andrew Twer



Tue, 24 Apr 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. To set = nothing or not to set = nothing...

2. Setting an object variable to Nothing does not destroy the object

3. Why setting objects to Nothing?

4. Setting Objects to Nothing

5. Setting Objects to Nothing

6. Setting objects to Nothing

7. Either Nothing Or Object Reference Not Set

8. setting objects to nothing

9. Setting application object to nothing doesn't end the process

10. Question about setting objects to nothing

11. Setting objects = Nothing

12. When do I set object = nothing in VB6

 

 
Powered by phpBB® Forum Software