Developer technologies | Visual Basic for Applications
An implementation of Visual Basic that is built into Microsoft products.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am developing an Excel macro and am having trouble with error trapping.
Here is the actual code I am using:
'Select Name Tab
On Error GoTo NEXTA
Sheets(Name).Select
GoTo NEXTB
NEXTA:
Call Add_A_Name(Name, EnvNo)
NEXTB:
On Error GoTo 0
The first time this code is executed, it works fine. However, the second time through the 'On Error GoTo NEXTA' statement is ignored, despite the fact that it is reset with the 'On Error GoTo 0' code. I have experienced this problem before using other logic but before, I was able to work around the problem. This time I can't. Why?
An implementation of Visual Basic that is built into Microsoft products.