DIAdem Help

Object: Err

  • Mise à jour2024-09-12
  • Temps de lecture : 1 minute(s)

Object: Err

The Err object enables access to the error object in VBS. You can generate a runtime error with this object and request information about an error.

The following example generates an error and displays the error number and the error description: The example then deletes the error again:

Dim sOutput
On Error Resume Next
Call Err.Raise(6) 'Raise an overflow error
If Err.Number <> 0 Then
   sOutput = "Error Number: " & Err.number & VBCrLf & _
             "Description:  " & Err.Description
   Call MsgBox(sOutput, , "Error: " & Err.Description)
End If
On Error Goto 0
Call Err.Clear()

Methods

Clear | Raise

See Also

Objects Overview

Related Topics

On Error | Err