Hi,
I have an application written in VB which runs a particular macro in a few
Excel workbooks. Is there a way to capture the errors raised in the macro in
VB? Specifically, I dont want Excel or VBA to display any errors. All errors
must be transfered to the VB code calling the macro. (Err.Raise in the macro
just shows up a dialog with it going into the errorhandler of the calling VB
code.)
Thanks in advance!
Priya
MSweetG222 - 23 Mar 2006 16:46 GMT
Priya -
Try...
MyErrNum = Err.Number
MyErrDescr = Err.Description
This will store the Error # and Description in VBA memory variables. You
can then write code to store to an excel worksheet if you wish.

Signature
Thx
MSweetG222
> Hi,
>
[quoted text clipped - 7 lines]
> Thanks in advance!
> Priya
MSweetG222 - 23 Mar 2006 16:48 GMT
Oops - Sorry, I just noticed you said VB, not VBA.

Signature
Thx
MSweetG222
> Hi,
>
[quoted text clipped - 7 lines]
> Thanks in advance!
> Priya