|
-
September 19th, 2001, 09:10 AM
#1
Hos do I find out if an object exists?
If an object has not been set, its value is "Nothing" and reference to it will give an error. Is there a way to see if an object exists?
For example, I need to look at the nodes of a TreeView and determine the parent of each node. Node.Parent causes an error if there is no parent.
-
September 19th, 2001, 09:15 AM
#2
Re: Hos do I find out if an object exists?
You can test it in a If statement
If myObject is nothing then
Msgbox "Object not set"
End If
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
-
September 19th, 2001, 09:40 AM
#3
Re: Hos do I find out if an object exists?
Excellent. Sometimes the obvious is hard to see.
Sorry about the typo in the title.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|