View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Edd[_2_] Edd[_2_] is offline
external usenet poster
 
Posts: 22
Default 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,