View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bill Lunney Bill Lunney is offline
external usenet poster
 
Posts: 68
Default Error Handling

On Error Goto 0 will simply turn off custom error trapping. You have two
other choices:

1 - On error resume next - Will continue execution at the next statement
regardless of errors

2 - On Error Goto errUnknown - Will jump to the line errUnknown upon an
error. E.g.

On Error Goto ErrUnknown
DummyVal = 15/0 ' Will raise a divide by 0 error
Exit Sub

ErrUnknown:
msgbox Err.Description




--
Regards,


Bill Lunney
www.billlunney.com

"Bin" wrote in message
...
Is there anyway in Vb Program to use a code to override
Error Trapping setting in VB/Tools/Option?
If the setting is "Break on All Error", program error
handling statement will not work.
I tried to use "On Error Goto 0" to override it, but it
doesn't work.
Anyone can help? Thanks.