ClassMicrosoft.VisualBasic.ErrObject SyntaxErr.Clear( ) DescriptionThe Clear method explicitly resets all the properties of the Err object after an error has been handled. Usage at a Glance
ExampleOn Error Resume Next Err.Clear( ) Call ErrorProneRoutineWithNoHandler( ) If (Err.Number <> 0) Then ' ----- The generated error must have come from the ' subroutine call, since the Clear( ) method ' set Err.Number to 0. MsgBox ("The Error : " & Err.Description & vbCrLf _ & " was generated in " & Err.Source & ".") End If See AlsoErr Object, Err.Raise Method |