on error in whole workbook ?
Hi,
I have so much code that i would like to know if there is an 'on error' possible that would work throughout all the codes and subs in the application. On error, i would like to know what the error is and then close the application. Any ideas? thanks, Pierre -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200510/1 |
on error in whole workbook ?
Sub test()
On Error GoTo error_handler '' do your stuff Exit Sub error_handler: MsgBox "An error occured in test. " & vbCr & Err.Description & vbCr & Err.Number Err.Clear Application.DisplayAlerts = False Application.Quit End Sub Greetz, Rody "Pierre via OfficeKB.com" <u13950@uwe schreef in bericht news:567ae48b77ed6@uwe... Hi, I have so much code that i would like to know if there is an 'on error' possible that would work throughout all the codes and subs in the application. On error, i would like to know what the error is and then close the application. Any ideas? thanks, Pierre -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200510/1 |
on error in whole workbook ?
thanks Rody !
Works fine. Pierre Rody Meulman wrote: Sub test() On Error GoTo error_handler '' do your stuff Exit Sub error_handler: MsgBox "An error occured in test. " & vbCr & Err.Description & vbCr & Err.Number Err.Clear Application.DisplayAlerts = False Application.Quit End Sub Greetz, Rody Hi, [quoted text clipped - 7 lines] thanks, Pierre -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200510/1 |
All times are GMT +1. The time now is 08:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com