What is the difference between 'On Error Resume Next' and 'On Error GoTo'?

Responsive Ad Header

Question

Grade: Education Subject: Support
What is the difference between 'On Error Resume Next' and 'On Error GoTo'?
Asked by:
74 Viewed 74 Answers

Answer (74)

Best Answer
(402)
While both statements deal with errors, they function differently. 'On Error Resume Next' tells VBA to continue executing the code regardless of the error. It's a general skip. 'On Error GoTo' allows you to jump to a specific label to handle the error in a defined way. It provides more granular control over error handling. 'On Error GoTo' requires you to define a label and a handler for the error.