View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob Bovey Rob Bovey is offline
external usenet poster
 
Posts: 811
Default On Error Resume Next

"Stefi" wrote in message
...
If I use "On Error Resume Next" in a public function, does "On Error
Resume
Next" remain in effect after stepping out from the function, or have I to
explicitely make it ineffective with an "On Error Goto 0" statement before
steeping out from the function?


Hi Stefi,

The effect of On Error Resume Next is generally confined to the
procedure where it is used. Once code exits that procedure it has the same
effect as the On Error Goto 0 statement. The one major exception to this
rule is when you call another procedure that has no error handling of its
own after an On Error Resume Next statement. In this case, an error in the
called procedure (the one with no error handling) will cause code execution
to silently bail out of that procedure and continue on the next line in the
calling procedure (the one where On Error Resume Next is in operation).

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm