Determine if an object is initialized and Object Type ?

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
 
M

Michel Walsh

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top