Question
Can you use `Exit Sub` outside of an `On Error` statement?
Asked by: USER1288
58 Viewed
58 Answers
Answer (58)
Yes, `Exit Sub` can be used outside of an `On Error` statement. However, it's generally recommended to use it *within* an `On Error` block to specifically terminate a `Sub` after handling an error. Using it outside of an `On Error` block doesn't inherently prevent errors but can disrupt the flow of execution if an error occurs elsewhere in the code.