How to trap Error IF ACad application can't open

Discussion in 'AutoCAD' started by Soe, Jun 26, 2003.

  1. Soe

    Soe Guest

    I used VB6, not VBA, and autoCad2002 Network Version.
    I open autocad as
    Set ACadProgram = CreateObject(autoCAD.application)
    I also put "On Error" statement in the module.
    When I can have Lic from server, it works well. But if I can't have Lic,
    then instead of going ErrorClause, it prompts runtime error and program
    stopped.
    Any advice.
     
    Soe, Jun 26, 2003
    #1
  2. Soe

    Tim Arheit Guest

    Is is doing this in the IDE or from the executable?

    By default VB6 is set to 'Break in Class Module' regardless if the
    error is trapped or not. It also could be set to 'break on all
    errors'.

    Check Tools->Options->General->Error Trapping.
    You want it set to 'Break on Unhandled Errors'

    -Tim
     
    Tim Arheit, Jun 26, 2003
    #2
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 (here). After that, you can post your question and our members will help you out.