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?
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?
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
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks