Microsoft® Visual Basic® Scripting Edition
Number Property
 Language Reference 
Version 1 

See Also                     Applies to

Returns or sets a numeric value specifying an error. Number is the Err object's default property.
object.Number [= errornumber]

The Number property syntax has these parts:

Part Description
object Always the Err object.
errornumber An integer representing a VBScript error number or an SCODE error value.

When returning a user-defined error from an Automation object, set Err.Number by adding the number you selected as an error code to the constant vbObjectError. For example, you use the following code to return the number 1051 as an error code:
Err.Raise Number:= vbObjectError + 1051, Source:= "SomeClass"

© 1997 Microsoft Corporation. All rights reserved.