Solved

if statement when value is nothing

Posted on 2011-09-12
4
254 Views
Last Modified: 2012-05-12
Hi,

At the beginning of my code, I set a value to nothing like this:
Set Oppen =  Nothing

Later on down in the code, I have an if statement to check that value like this:

if Oppen <> Nothing then........

It does not work.  I've tried these with no luck:

if Oppen <> Nothing then
if Oppen <> Null then
if Oppen is not null then
if Oppen <> Empty then

Thanks for your help,
Joel

0
Comment
Question by:Genius123
  • 2
4 Comments
 
LVL 18

Expert Comment

by:Cluskitt
ID: 36523367
if Oppen Is Not Nothing then
0
 
LVL 23

Expert Comment

by:Brian B
ID: 36523373
Uusally a null value is represented by "":

if oppen <> "" then
0
 
LVL 18

Accepted Solution

by:
Cluskitt earned 250 total points
ID: 36523418
Actually, I have to correct my code to:
if Not Oppen Is Nothing then
0
 

Author Closing Comment

by:Genius123
ID: 36523458
Thanks for the quick reply.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question