Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Capturing Errors in Macros using VB

You could make that Excel macro a function, handle the error in that
function
and pass the error to VB as a result of that function. Haven't tried it but
I think
you could pass the Err object from the Excel function to VB.
Then you can do whatever you want with this in VB.

RBS


"Priya" wrote in message
...
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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to run two macros without errors daidipya Excel Discussion (Misc queries) 3 June 2nd 06 08:51 AM
Capturing errors in Macros using VB Priya[_4_] Excel Programming 2 March 23rd 06 03:48 PM
macros errors Natalie Excel Worksheet Functions 5 March 14th 05 02:27 PM
Capturing query table errors T. Erkson Excel Programming 3 February 28th 05 05:26 PM
Capturing query table errors T. Erkson Excel Worksheet Functions 1 February 24th 05 09:26 PM


All times are GMT +1. The time now is 07:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"