Re: What is best way to see if an object exist ?
From: Ken Halter (Ken_Halter_at_Use_Sparingly_Hotmail.com)
Date: 03/17/04
- Next message: erdem: ".Net with XP and w2000 environment"
- Previous message: Ken Halter: "Re: VB.net Application - Embedding Web Control"
- In reply to: Phil Hunt: "Re: What is best way to see if an object exist ?"
- Next in thread: Phil Hunt: "Re: What is best way to see if an object exist ?"
- Reply: Phil Hunt: "Re: What is best way to see if an object exist ?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 17 Mar 2004 09:39:13 -0800
Note that the tests will never work if you use the following syntax to declare and create
the object variable...
Dim SomeObj As New SomeClass
....but, it works every time with the following
Dim SomeObj As SomeClass
Set SomeObj = New SomeClass
-- Ken Halter - MS-MVP-VB - http://www.vbsight.com Please keep it in the groups.. "Phil Hunt" <phung@ktintl.com> wrote in message news:ODqhvVEDEHA.1604@TK2MSFTNGP11.phx.gbl... > thanks, I was trying obj = nothing > "Phil Hunt" <phung@ktintl.com> wrote in message > news:eM4%239uDDEHA.3404@TK2MSFTNGP10.phx.gbl... > > I use Dim objAny as classAny in my code, sometime i fall into place where > i > > check for the object property before it is Set. So is there a standard way > > to check its existence ? > > Trap the error or some other way ? > > > > > >
- Next message: erdem: ".Net with XP and w2000 environment"
- Previous message: Ken Halter: "Re: VB.net Application - Embedding Web Control"
- In reply to: Phil Hunt: "Re: What is best way to see if an object exist ?"
- Next in thread: Phil Hunt: "Re: What is best way to see if an object exist ?"
- Reply: Phil Hunt: "Re: What is best way to see if an object exist ?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|