What is the basic syntax for using 'On Error GoTo' in VBA?

Responsive Ad Header

Question

Grade: Education Subject: Support
What is the basic syntax for using 'On Error GoTo' in VBA?
Asked by:
58 Viewed 58 Answers

Answer (58)

Best Answer
(213)
The basic syntax is 'On Error GoTo [LabelName]' where '[LabelName]' is a valid line label within your VBA procedure. This statement tells VBA to transfer execution to the specified label if a runtime error occurs.