Results 1 to 10 of 10

Thread: Tasks / VB6

  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts
    We have a rather old VB6 application which has functioned well for some time, but is now problematic.

    Our purpose was to determine whether WordPerfect was running. A bit of our code:

    dim t as Task
    for each t in Tasks
    if t.Name = "WordPerfect"
    etc.

    The debugger is stopping on "for each t in Tasks" and the error is "Cannot create ActiveX object."

    Why would this occur at this point in time, and is there a better way to determine if WP is running?

    Thanks.

  2. #2
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts
    We have a rather old VB6 application which has functioned well for some time, but is now problematic.

    Our purpose was to determine whether WordPerfect was running. A bit of our code:

    dim t as Task
    for each t in Tasks
    if t.Name = "WordPerfect"
    etc.

    The debugger is stopping on "for each t in Tasks" and the error is "Cannot create ActiveX object."

    Why would this occur at this point in time, and is there a better way to determine if WP is running?

    Thanks.

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts
    We have a rather old VB6 application which has functioned well for some time, but is now problematic.

    Our purpose was to determine whether WordPerfect was running. A bit of our code:

    dim t as Task
    for each t in Tasks
    if t.Name = "WordPerfect"
    etc.

    The debugger is stopping on "for each t in Tasks" and the error is "Cannot create ActiveX object."

    Why would this occur at this point in time, and is there a better way to determine if WP is running?

    Thanks.

  4. #4
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts
    We have a rather old VB6 application which has functioned well for some time, but is now problematic.

    Our purpose was to determine whether WordPerfect was running. A bit of our code:

    dim t as Task
    for each t in Tasks
    if t.Name = "WordPerfect"
    etc.

    The debugger is stopping on "for each t in Tasks" and the error is "Cannot create ActiveX object."

    Why would this occur at this point in time, and is there a better way to determine if WP is running?

    Thanks.

  5. #5
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts
    We have a rather old VB6 application which has functioned well for some time, but is now problematic.

    Our purpose was to determine whether WordPerfect was running. A bit of our code:

    dim t as Task
    for each t in Tasks
    if t.Name = "WordPerfect"
    etc.

    The debugger is stopping on "for each t in Tasks" and the error is "Cannot create ActiveX object."

    Why would this occur at this point in time, and is there a better way to determine if WP is running?

    Thanks.

  6. #6
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts
    We have a rather old VB6 application which has functioned well for some time, but is now problematic.

    Our purpose was to determine whether WordPerfect was running. A bit of our code:

    dim t as Task
    for each t in Tasks
    if t.Name = "WordPerfect"
    etc.

    The debugger is stopping on "for each t in Tasks" and the error is "Cannot create ActiveX object."

    Why would this occur at this point in time, and is there a better way to determine if WP is running?

    Thanks.

  7. #7
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts
    We have a rather old VB6 application which has functioned well for some time, but is now problematic.

    Our purpose was to determine whether WordPerfect was running. A bit of our code:

    dim t as Task
    for each t in Tasks
    if t.Name = "WordPerfect"
    etc.

    The debugger is stopping on "for each t in Tasks" and the error is "Cannot create ActiveX object."

    Why would this occur at this point in time, and is there a better way to determine if WP is running?

    Thanks.

  8. #8
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts
    We have a rather old VB6 application which has functioned well for some time, but is now problematic.

    Our purpose was to determine whether WordPerfect was running. A bit of our code:

    dim t as Task
    for each t in Tasks
    if t.Name = "WordPerfect"
    etc.

    The debugger is stopping on "for each t in Tasks" and the error is "Cannot create ActiveX object."

    Why would this occur at this point in time, and is there a better way to determine if WP is running?

    Thanks.

  9. #9
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Quote Originally Posted by richardbarrett View Post
    The debugger is stopping on "for each t in Tasks" and the error is "Cannot create ActiveX object."

    Why would this occur at this point in time, and is there a better way to determine if WP is running?
    Is it possible that the VB app was using a no-longer-available MS Office object library to access the Tasks collection? (This thought arises from the results for this query: tasks collection site:microsoft.com - Google Search.)

    The Win32 API has native functions for identifying running applications and processes. I'm not sure which make(s) the most sense for WordPerfect, but perhaps others have suggestions.

  10. #10
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts
    I think you are right. The VB application probably referenced Word. Thanks for pointing this out.

    Richard

Posting Permissions

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