How do I prevent an infinite loop when using `On Error GoTo`?

Question

Grade: Education Subject: Support
How do I prevent an infinite loop when using `On Error GoTo`?
Asked by:
61 Viewed 61 Answers

Answer (61)

Best Answer
(276)
Ensure that your `ErrorHandler` block actually handles the error and doesn't inadvertently cause another error that triggers the same handler again. Also, make sure you `Err.Clear` within the handler to prevent the error from persisting and triggering the handler repeatedly.