Results 1 to 3 of 3

Thread: Checking Object Existence

  1. #1
    Adept Developer
    Guest

    Checking Object Existence

    I'm writing a component and in my _Initialize Event I set WordApp = CreateObject("Word.Application"), but sometimes the process remains running if the component doesn't exist gracefully.

    Is there some code I should put in the _Terminate Event? How do I check to see if WordApp is actually a live object?

    Thanks.
    -Steve

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    not sure if this will work for what you are doing but you could use the isobject() function maybe?

  3. #3
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    VB Code:
    1. If Not WordApp Is Nothing Then ..... 'the object is live

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