Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Capturing errors in Macros using VB
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Capturing errors in Macros using VB
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. -- Thx MSweetG222 "Priya" wrote: 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Capturing errors in Macros using VB
Oops - Sorry, I just noticed you said VB, not VBA.
-- Thx MSweetG222 "Priya" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Want to run two macros without errors | Excel Discussion (Misc queries) | |||
Is it possible to turn off errors in macros??? | Excel Programming | |||
macros errors | Excel Worksheet Functions | |||
Capturing query table errors | Excel Programming | |||
Capturing query table errors | Excel Worksheet Functions |