How can you retrieve information about the error that occurred using 'On Error GoTo'?

Responsive Ad Header

Question

Grade: Education Subject: Support
How can you retrieve information about the error that occurred using 'On Error GoTo'?
Asked by:
85 Viewed 85 Answers

Answer (85)

Best Answer
(270)
Within your error-handling block, you can use the built-in VBA objects 'Err.Number' and 'Err.Description' to get the error code and a textual description of the error, respectively. You can also use 'Err.Source' to determine which object or application raised the error.