Testing an object varible for Nothing

  • Thread starter Thread starter Conan Kelly
  • Start date Start date
C

Conan Kelly

Hello all,

How do I test if an object variable is set to Nothing in an If...Then statement?
 
if obj Is N othing Then
'do something

--
HTH

Bob Phillips

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

if obj Is Nothing Then
'do something

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
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)
 
I just did this today. Here's how I did it:

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

Sincerely,
Pflugs
 
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
 
Back
Top