How can I reset the error handler in VBA?

Responsive Ad Header

Question

Grade: Education Subject: Support
How can I reset the error handler in VBA?
Asked by:
41 Viewed 41 Answers

Answer (41)

Best Answer
(346)
To reset the error handler and clear the `Err` object's properties after handling an error, you can use the `On Error GoTo 0` statement. This disables any active `On Error GoTo` or `On Error Resume Next` statement. Alternatively, simply exiting the procedure where the error occurred will also reset the error handler for that specific procedure.