ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error Handling (https://www.excelbanter.com/excel-programming/273753-re-error-handling.html)

Bill Lunney

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.





All times are GMT +1. The time now is 08:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com