View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rody Meulman[_3_] Rody Meulman[_3_] is offline
external usenet poster
 
Posts: 14
Default 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