Solved

if statement when value is nothing

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Many people use more than one email account and so it becomes difficult for them to manage them when they use separate accounts,  so, in this article, I have shared an easy way to add Other Mail Accounts in your Google Inbox. It helps to combine all…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

749 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