Source

This property returns and sets the name of the object or application that generated an error.

Syntax

object.Source [= stringexpression]

Parameters

object
Always the Err object.
stringexpression
String expression that represents the application that generated the error.

Remarks

Use the Source property to provide a user with information when your code is unable to handle an error generated in an accessed object.

The Source property 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 a user. Use Source and the new Err object to inform the user which object originally caused the error, its description of the error, and so on.