VBScript » Err » Number

Version: 1.0

Syntax:
object.Number [ =errnumber]
errnumber
Used to set the value that relates to a specific runtime error or SCODE.

This property is used to retrieve or set the value that relates to a specific runtime error.

This property, which is the default property of the Err object, is used to retrieve or set the value that relates to a specific runtime error or SCODE. This value is automatically generated when an error occurs and is reset to zero (no error) after an On Error Resume Next statement or after using the Clear method.

Examples

Code:
<%
On Error Resume Next
Err.Raise 10
Err.HelpFile = "userhelp.hlp"
Err.HelpContext = usercontextID
If Err.Number <> 0 Then
MsgBox "Press F1 for help", , "Error: " Err.Description, Err.Helpfile, Err.HelpContext
End If
%>