Question
How can I use 'On Error Resume Next' and still get information about the error in VBA?
Asked by: USER8826
86 Viewed
86 Answers
Answer (86)
You can use 'On Error Resume Next' and then immediately after the line that might cause an error, check the 'Err.Number'. If it's not 0, you can then display 'Err.Description' or take other actions based on the specific error number before clearing the error using 'Err.Clear'.