View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach[_6_] Otto Moehrbach[_6_] is offline
external usenet poster
 
Posts: 201
Default Error trapping & Handling

You can drop out of an If-Then construct with a GoTo and a label. You get
out of a For loop with "Exit For".
With the On Error, you can say something like:
On Error GoTo TheOtherPlace. Immediately after the TheOtherPlace label, put
"On Error GoTo 0" to reset the error system. Post back if you need more.
HTH Otto
"Jeff" wrote in message
...
I am trying to do the following;

I want to close without saving all open workbooks that are currently opn
and
happen to match a list in an array.

I want to "On Error" drop out of an If then or for ..next loop. How the
hell
do I accomplish this(I've tried 6 ways to sunday)

I Want to elegantly deal with things like "Worksheet exists" or "Note in
cell already exists"

Thanks in advance I've looked around using Google but I have had no
success.
Nobody seems to be interested in errors or giving away the secrets to us
Yobs!

Jeff