On Error Resume Next Fundamentals

llyal

Registered User.
Local time
Today, 16:13
Joined
Feb 1, 2000
Messages
72
On Error Resume Next Fundamentals

How does On Error Resume Next work? Does it affect ALL code after it? How does one reset On Error Resume Next so that this type of error trapping only affects a range of code (say a small loop routine that checks to see if files exist or not by).

I would like to have a normal subroutine error handler (On Error Goto ErrHandler...) for the general subroutine, but would like to have separate error handlers for key parts of the subroutine; is this possible? how?


Thank you!

Llyal
 
'On Error Resume Next' is good for when you know an error could occur but don't want the system to generate a message. This allows you to control what happens if an error occurs or does not occur.

the On Error Resume Next affects the code that comes after it up until the end of the proceedure or until another On Error... line thus you could have a proceedure with an unlimited amount of On Error... lines.
 

Users who are viewing this thread

Back
Top Bottom