On Error Resume Next

On Error Resume Next specifies that program execution continues with the next statement after the statement that generates the error, instead of specifying an error-handling routine that executes when the error occurs.

Sub TestHand 
   Dim num As Single
   On Error Resume Next
   num! = 1
   ' The next statement generates an error.
   Print num! / 0
   Print "Continuing after division-by-zero error."
End Sub
Call TestHand()
' Output:
' Continuing after division-by-zero error.

When execution resumes in this way, the error is considered handled. LotusScript® does not reset the values of the Err, Erl, and Error functions that were set when the error occurred.


Additional Documentation | Trademarks |