+ Reply to Thread
Results 1 to 2 of 2

Use same On Error twice

Hybrid View

  1. #1
    Registered User
    Join Date
    08-08-2005
    Posts
    1

    Use same On Error twice

    How can I use the same 'On Error' twice?

    example

    Start:
    On Error Goto Handle
    'code is here
    Goto EndMe
    Handle:
    MsgBox"Here is Error"
    Goto Start
    EndMe:

    The 'On Error' works the first time, but first time only. Help?

  2. #2
    Earl Kiosterud
    Guest

    Re: Use same On Error twice

    Jamnhan,

    There's only one error object, Err. You can examine Err.Number,
    Err.Description, etc., in your error handler. It's reset by Resume Next at
    the end of your error handler. If another error occurs before it's reset,
    it causes vba to issue an error message, something like "Aaaaauugh! I can't
    handle all these errors!"
    --
    Earl Kiosterud
    www.smokeylake.com

    "jamnham" <[email protected]> wrote in
    message news:[email protected]...
    >
    > How can I use the same 'On Error' twice?
    >
    > example
    >
    > Start:
    > On Error Goto Handle
    > 'code is here
    > Goto EndMe
    > Handle:
    > MsgBox"Here is Error"
    > Goto Start
    > EndMe:
    >
    > The 'On Error' works the first time, but first time only. Help?
    >
    >
    > --
    > jamnham
    > ------------------------------------------------------------------------
    > jamnham's Profile:
    > http://www.excelforum.com/member.php...o&userid=26072
    > View this thread: http://www.excelforum.com/showthread...hreadid=394096
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1