6.1.3.2.2.5 Number

 Property Number As Long 

Runtime Semantics.

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

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

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