PC Review


Reply
Thread Tools Rate Thread

Determine if an object variable is set

 
 
Brian
Guest
Posts: n/a
 
      19th Mar 2010
How can I determine if an object variable is Nothing.

Dim appMapPoint as Object
Set appMapPoint = CreateObject("MapPoint.Application")Set appMapPoint =
CreateObject("MapPoint.Application")

Later.... Set appMapPoint = Nothing

Here is why:

I am automating MapPoint via Access/VBA. I always set the map application
object to Nothing when I close it; however, I now need to block certain user
functions (like opening another map) if the instance of MapPoint is still
open. I thought perhaps I could check the state of the Object variable.

Like a dummy, I tried this: If appMpoint = Nothing Then

....of course, to no avail.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get what a variable is dimmed as? How to get what an object isdeclared as? If variable or object is Nothing? recurr Microsoft VB .NET 4 10th Dec 2007 04:12 PM
SqlConnection Object in Application Variable OR Session Variable OR open/close pratham Microsoft ASP .NET 3 31st Aug 2006 08:26 PM
How can I determine the name of a new object or variable at run-ti =?Utf-8?B?TSBTaGFmYWF0?= Microsoft C# .NET 3 18th Apr 2005 09:01 PM
Determine if an object is initialized and Object Type ? François Uldry Microsoft Access Form Coding 1 16th Feb 2004 12:45 PM
[VBA] Determine if a variable has no object Madla Microsoft Powerpoint 6 11th Feb 2004 06:21 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:51 PM.