Results 1 to 3 of 3

Thread: Help with object creation

  1. #1

    Thread Starter
    Hyperactive Member Ed Lampman's Avatar
    Join Date
    Mar 2001
    Posts
    273

    Help with object creation

    I posted this on the Com and ActiveX forum with no luck. Would appreciate any help.

    http://www.vbforums.com/showthread.php?threadid=85877

  2. #2
    Hyperactive Member
    Join Date
    May 2000
    Location
    Or
    Posts
    316
    I posted to your original thread, but I'll post here as well. Try using the IsEmpty Command.

    Example:

    VB Code:
    1. Private Sub Command1_Click()
    2. Dim ie As Object
    3.  
    4. If IsEmpty(ie) = True Then
    5.     ie.Visible = True
    6. Else
    7.     MsgBox "called"
    8.     Set ie = CreateObject("InternetExplorer.Application")
    9.     ie.Visible = True
    10. End If
    11.  
    12. End Sub

    Hope this helps.

  3. #3
    gaffa
    Guest
    Alternative option, again, posted in the original thread:

    I've always used Is Nothing:
    Code:
    If lobjObject Is Nothing then
        Set lobjObject = new DummyObject
    End iF
    - gaffa

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width