Testing an object varible for Nothing

C

Conan Kelly

Hello all,

How do I test if an object variable is set to Nothing in an If...Then statement?
 
B

Bob Phillips

if obj Is N othing Then
'do something

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
B

Bob Phillips

Typo

if obj Is Nothing Then
'do something

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
C

Conan Kelly

Bob,

Thanks for your help,

Conan


Bob Phillips said:
Typo

if obj Is Nothing Then
'do something

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
G

Guest

I just did this today. Here's how I did it:

If something Is Nothing Then
...do stuff...
End If

Sincerely,
Pflugs
 
C

Conan Kelly

Pflugs,

Thanks for the help,

Conan


Pflugs said:
I just did this today. Here's how I did it:

If something Is Nothing Then
...do stuff...
End If

Sincerely,
Pflugs
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top