On Error enables error-handling within your macro and specifies what will be done in an error occurs.
On Error GoTo – sends the code to a specific line
On Error Resume Next – just continues to the next line if an error occurs. And there is no Debug window if there is a runtime error.
On Error GoTo 0 – Resets the error handler and will show the Debug form if an error occurs.
On Error GoTo errHandler
d = 0
‘On Error Resume Next
‘On Error GoTo 0
If 0 / d = True Then
MsgBox “You did it”
d = 1
‘Resume – Will go back to the line of code that the error occured on and try to run it again
‘Resume Next – Will continue the Code but go to the next line