On Error {...} Resume Next
Hello:
I want to use the On Error Resume Next statement to allow my code to continue running but before the "Resume Next" part of the statement executes, I would like some intermediate code to run first. So, upon an error, I would like the main program to catch it, run some code, then resume program execution with the statement following the error. How can I insert the intermediate code? Thanks, |
On Error {...} Resume Next
You are looking for on error goto
sub whatever() on error goto Errorhandler 'do some stuff exit sub ErrorHandler: 'do the error stuff resume next End sub -- HTH... Jim Thomlinson "Edd" wrote: Hello: I want to use the On Error Resume Next statement to allow my code to continue running but before the "Resume Next" part of the statement executes, I would like some intermediate code to run first. So, upon an error, I would like the main program to catch it, run some code, then resume program execution with the statement following the error. How can I insert the intermediate code? Thanks, |
On Error {...} Resume Next
This is great!! Thank you Jim...
"Jim Thomlinson" wrote: You are looking for on error goto sub whatever() on error goto Errorhandler 'do some stuff exit sub ErrorHandler: 'do the error stuff resume next End sub -- HTH... Jim Thomlinson "Edd" wrote: Hello: I want to use the On Error Resume Next statement to allow my code to continue running but before the "Resume Next" part of the statement executes, I would like some intermediate code to run first. So, upon an error, I would like the main program to catch it, run some code, then resume program execution with the statement following the error. How can I insert the intermediate code? Thanks, |
All times are GMT +1. The time now is 09:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com