I have a couple of questions in regard to error handling.
Q1 - The manual notes that you must terminate a error trap with a RESUME statement. Could you not just fall out of the sub/func as well or do you have to RESUME?
Q2 - I see noted a RESUME label and a RESUME Next but not a RESUME. How would you try the offending line again?
Q3 - If you want to cancel error trap for a couple lines of code you can use the RESUME NEXT. How do you start the error trap again for that sub/func?
In the code above after the On Error Goto 0 would the On Error Goto ErrorRoutine be in effect?
Thanks.
Q1 - The manual notes that you must terminate a error trap with a RESUME statement. Could you not just fall out of the sub/func as well or do you have to RESUME?
Q2 - I see noted a RESUME label and a RESUME Next but not a RESUME. How would you try the offending line again?
Q3 - If you want to cancel error trap for a couple lines of code you can use the RESUME NEXT. How do you start the error trap again for that sub/func?
Code:
Private Sub MySub() On Error Goto ErrorRoutine (some code....................) 'stop error trap On Error Resume Next (some code....................) On Error Goto 0 (some code....................) ErrorRoutine: (some code....................) End Sub
Thanks.
Comment