Solved

Is Nothing? I wish...

Posted on 1999-01-07
4
146 Views
Last Modified: 2010-05-03
I need to do a comparison to see if an object is nothing (I'm parsing through a tree and I want to see if the next sibling is nothing).  Is there anything like an IsNothing() compare? How can I check to see if an object=nothing.

0
Comment
Question by:jmalcolm
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
jeffcameron earned 20 total points
ID: 1454737
if object is nothing then
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1454738
isnull()
0
 
LVL 1

Expert Comment

by:jeffcameron
ID: 1454739
i dont beleive isnull will work
0
 

Author Comment

by:jmalcolm
ID: 1454740
Jeff, very good.  I don't understand why the designers of VB chose to go with such different method of dealing with invalid types.  There's "ISNULL" "ISEMPTY" and then simply IS for the Nothing object.  That's not very intuative.  Thanks.

P.S. You are right, ISNULL won't work for nothing objects.  I've tried.


0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Title # Comments Views Activity
Help me. 3 60
VB6 ListBox Question 4 50
Create Files based on Cell Values in a Range in Excel 12 43
adding "ungroup sheets" to existing vbs code 5 33
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

821 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