This statement enables and disables error handling.
On Error Resume Next
On Error Goto 0
If you do not use an On Error Resume Next statement, any run-time error that occurs is fatal; that is, an error message displays and execution of the current procedure stops.
An On Error Resume Next statement becomes inactive when another procedure is called, so you should execute an On Error Resume Next statement in each called routine if you want inline error handling within that routine.
On Error Goto 0 turns off inline error handling and enables errors to halt execution of your code.