Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I check if an object has been created 1

Status
Not open for further replies.

paulparky

Programmer
Oct 10, 2001
29
PA
I want to check if an object has been created before I close a program. I have tried using ISOBJECT(object variable) but this returns TRUE every time, then the program bombs with "object variable not set" at the "disconnect" method. This is my code

If IsObject(UDSession) = True Then
UDSession.Disconnect
Set UDSession = Nothing
End If

Thanks
 
If Not UDSession Is Nothing Then
UDSession.Disconnect
Set UDSession = Nothing
End If

------------------------------------------
The faulty interface lies between the chair and the keyboard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top