How does 'On Error GoTo' interact with other error handling mechanisms like `Try...Catch` (introduced in later VBA versions)?

Question

Grade: Education Subject: Support
How does 'On Error GoTo' interact with other error handling mechanisms like `Try...Catch` (introduced in later VBA versions)?
Asked by:
125 Viewed 125 Answers

Answer (125)

Best Answer
(327)
In VBA versions that support `Try...Catch`, `Try...Catch` takes precedence over `On Error GoTo`. If an error occurs within a `Try` block, the `Catch` block will be executed first. `On Error GoTo` statements outside the `Try...Catch` block will still function, but errors within the `Try` block are handled by the `Catch` block.