Determine if an object is initialized and Object Type ?

  • Thread starter Thread starter François Uldry
  • Start date Start date
F

François Uldry

Hi All,

Got a stupid question, I got a global object meant to store a word
application.

As I cannot be sure if the object is set properly I want to check each time
before I use it.

How can I do that ?

Francois
 
Hi,


If myObject Is Nothing then ...


should be among the first checks. That should tell if the object
is already initialized, by opposition to be just declared. It is preferable
to use:

Dim myObject As Object


instead of


Dim myObject As New Object




Hoping it may help,
Vanderghast, Access MVP
 
Back
Top