Purpose
Clears the content of the last error so that subsequent checks won't recognize the error condition.
Syntax
Err.Clear
Example
Sub Main()
Dim f as File
On Error Goto ErrHandler:
f.OpenFile ("NonExistentFile", fcRead)
Debug "OpenFile success"
Exit Sub
ErrHandler:
Debug "Clear:" & Err.Clear
If Err.Number = 104 Then
Debug "OpenFile failed"
Else
Err.Raise
End If
End Sub
|