View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default How to programmatically set Error Trapping in VBE

I *think* this is what you're driving at.

On Error Resume Next
MsgBox 5 / 0
If Err < 0 Then
MsgBox ("Error:= " & Err)
End If
On Error GoTo 0



"Tim Zych" wrote:

When I use error handling, it will be ignored if VBE's Error Trapping
setting is set to "Break On All Errors".

Therefore the following code would produce an error.

On Error Resume Next
Msgbox 5/0

Is there a way to programmatically set Error Trapping to "Break On Unhandled
Errors"?

Thanks


--
Tim Zych
http://www.higherdata.com
Workbook Compare - Excel data comparison utility
Free and Pro versions