View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default 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,