Re: Error propagation in vba
Definitely i will help you out it would be more helpful if you can provide me the code in which you are getting this error.
Re: Error propagation in vba
Here goes the code
Code:
Private MySub()
On Error GoTo ErrTrap
Sub1
Sub2
Exit sub
ErrTrap:
If Err.Number = 18 Then
MsgBox "Error 10"
Else
MsgBox "Error 20"
End If
End
Over here Sub1 and Sub2 do not contain any error handling but my exception was even if user gets an Error 18 and is user press Esc button he should go through error handing of MySub.
Re: Error propagation in vba
As i can see that you need to add one lince of code which you can insert it anywhere before you call the subs.
Code:
Application.EnableCancelKey = xlErrorHandler