Error Handler

  • Hello,

    I have a code that I use to retrieve work orders into the original template. The user enters the job number they wish to retrieve, very simple and works really good. However I need to add an error handler so if they enter a job number that does not exist that it displays a message telling the user that the job number they are trying to retrieve does not exist.

    This is the code I have...

  • Re: Error Handler

    There's 2 sides to this.

    Check the file exists BEFORE trying to open it - if not then inform user and exit
    Trap any other errors that might occur.

    Try sometihing like

  • Re: Error Handler

    Added a check to see if Dir returns a filename. If not, the messagebox shows and the Sub exits without closing the form.

    Oops, looks like an answer was already posted. Here's my code anyway.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!