Limit an GoTo Function command

  • Thread starter Thread starter lbsstacey
  • Start date Start date
L

lbsstacey

I am writing VB code in Excel to reformat a number of Excel spreadsheets.
There's a section of the code where I have inserted an "On error GoTo
Function" command to skip past a section of code if certain requirements are
not met. However, if my code errors at any other place than in that one
section, the code loops back to the error function.

Is it possible to limit the section of code that the On Error GoTo Function
so secondary errors don't llop back to the defined function?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top