Solved

if statement when value is nothing

Posted on 2011-09-12
4
253 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Outlook 2016 display images 14 44
Keyboard shortcuts for Back & Forward QAT arrows in Excel 3 56
Remote Access to Outlook 5 35
Calendar and Email kept in Andriod 6 23
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now