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