ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Limit an GoTo Function command (https://www.excelbanter.com/excel-programming/409591-limit-goto-function-command.html)

lbsstacey

Limit an GoTo Function command
 
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?

Per Jessen

Limit an GoTo Function command
 
Hi

Use code below to disable your Error Handler :

On Error Goto 0

Regards,
Per

"lbsstacey" skrev i meddelelsen
...
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?




All times are GMT +1. The time now is 05:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com