Source

Returns or sets the name of the object or application that originally generated the error.

Syntax

object.Source [= stringexpression]

The parts of the Source property syntax are described in the following table.

Part Description
object Always the Err object.
stringexpression A string expression representing the application that generated the error.

Remarks

Use Source to provide your users with information when your code is unable to handle an error generated in an accessed object.

Source always contains the name of the object that originally generated the error. Your code can try to handle the error according to the error documentation of the object you accessed. If your error handler fails, you can use the Err object information to describe the error to your user, using Source and the other Err to inform the user which object originally caused the error, its description of the error, and so forth.