Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

if statement when value is nothing

Posted on 2011-09-12
4
Medium Priority
?
262 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 18

Expert Comment

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

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 1000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
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…

598 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