Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2001
    Posts
    2

    Unanswered: How prevent VBE from opening?

    How can I prevent VBE opening when any error occures in client application?
    On any error I like to have only error message and application closing after that.

    AR

  2. #2
    Join Date
    Jul 2002
    Posts
    67
    Have you added any error trapping to your code? Also, I believe, you can go to Tools --> Options --> Advanced and select how the application deals with errors.

    Example Error Trapping Script

    Code:
    Public Sub Something()
          On Error GoTo errHandler
    
           <<  main routine code here >>
    
    ExitHere:
           Exit Sub
    
    errHandler:
           MsgBox err.Number & vbCrLf & err.Description
           Resume ExitHere
    End Sub
    HTH
    Don't do today, what can be done tomorrow.

  3. #3
    Join Date
    Sep 2001
    Posts
    2

    Stupid question

    Where I must put error traping, in every form and module or exists one place where i can trap all errors?

    AR

  4. #4
    Join Date
    Aug 2002
    Location
    Singapore
    Posts
    91

    Re: Stupid question

    How about converting your mdb to mde? The VBE won't be opened by an error in MDE.

  5. #5
    Join Date
    Aug 2002
    Location
    Québec, Canada
    Posts
    109

    Re: How prevent VBE from opening?

    Well actually, error trapping should be used every place (sub and function) that use objects, but if you only care about the opening of the application, you can just put the error handling in the OPEN event of the start form, and you exit when an error occurs

    JefB

Posting Permissions

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