Number Property (Err Object)
Gets or sets a numeric value that specifies an error. Read/write.
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:
This example illustrates a typical use of the Number property in an error-handling routine. The Description property is also used in the example in order to provide a description of the error.
Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)