What happens if an error occurs *after* a `On Error GoTo End Sub` statement but *before* the end of the Sub?

Question

Grade: Education Subject: Support
What happens if an error occurs *after* a `On Error GoTo End Sub` statement but *before* the end of the Sub?
Asked by:
108 Viewed 108 Answers

Answer (108)

Best Answer
(268)
If an error occurs after the `On Error GoTo End Sub` statement but before the `End Sub` statement, the code will immediately jump to the `End Sub` statement, effectively terminating the Sub procedure. Any code after the error but before `End Sub` will not be executed.