It looks like Application.Run destroys the error handling chain.
Calling Test1 causes the message box to display. Calling Test2 does not. Is this a bug?
My application uses extensive use of Application.Run to simulate "virtual" functions. Is there some way to overcome this apparent limitation of the error handling mechanism in VBA?
Calling Test1 causes the message box to display. Calling Test2 does not. Is this a bug?
My application uses extensive use of Application.Run to simulate "virtual" functions. Is there some way to overcome this apparent limitation of the error handling mechanism in VBA?
Code:
Public Sub Test1()
On Error GoTo doErr
MakeErr
doErr:
MsgBox ("here")
End Sub
Public Sub Test2()
On Error GoTo doErr
Application.Run "MakeErr"
doErr:
MsgBox ("here")
End Sub
Public Sub MakeErr()
Err.Raise 1
End Sub