Number Property (Visual Basic for Applications)

Microsoft Visual Basic Constants

Number Property

           

Returns or sets a numeric value specifying an error. Number is the Err object's default property. Read/write.

Remarks

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

Err.Raise Number := vbObjectError + 1051, Source:= "SomeClass"