It means, when an error happens on the line, it is telling vbscript to continue execution without aborting the script. Sometimes, the On Error
follows the Goto
label to alter the flow of execution, something like this in a Sub
code block, now you know why and how the usage of GOTO
can result in spaghetti code:
Sub MySubRoutine() On Error Goto ErrorHandler REM VB code... REM More VB Code... Exit_MySubRoutine: REM Disable the Error Handler! On Error Goto 0 REM Leave.... Exit Sub ErrorHandler: REM Do something about the Error Goto Exit_MySubRoutine End Sub