External error (1 Viewer)

pepepito78

New member
Local time
Today, 16:51
Joined
Mar 7, 2020
Messages
15
Hi. I have an access database that dumps data into different Excel workbooks. They are excel books made by other people. After dumping the data from my Access database I execute a macro of the book. My problem is that when I run a macro that gives error, my application is waiting. I would like when the external error macro is recognized by my application.

Regards, and thank you very much
 

CJ_London

Super Moderator
Staff member
Local time
Today, 15:51
Joined
Feb 19, 2013
Messages
16,668
excel is not multiuser - so perhaps your dumping code is closing excel before running the (what I presume is) a macro in excel? Or perhaps it is closing it?

Not enough information to provide a better suggestion. Suggest you step through the code and check everything is as it should be

Otherwise you need to post the code you use to dump data the data, the code to execute the excel macro and the excel macro itself
 

pepepito78

New member
Local time
Today, 16:51
Joined
Mar 7, 2020
Messages
15
Thank you, the problem is not when dumping data. From Acces I open the book, enter the data and run a macro that belongs to the book. Normally it works well (the code is correct), but sometimes the macro (made by someone else) gives an error at runtime for whatever reason. I from my VBA process want to know that the macro of that book is giving an error so that it continues and does not stay waiting. I hope I have explained myself better. in summary I want from VBA access to know if an excel book is showing an error message (add code) Thank you
 

CJ_London

Super Moderator
Staff member
Local time
Today, 15:51
Joined
Feb 19, 2013
Messages
16,668
Not really. As already said, you need to provide the code you are using.

want from VBA access to know if an excel book is showing an error message
best I can suggest is add a messagebox to your excel macro to display the error
 

pepepito78

New member
Local time
Today, 16:51
Joined
Mar 7, 2020
Messages
15
Not really. As already said, you need to provide the code you are using.

best I can suggest is add a messagebox to your excel macro to display the error
thanks, but i don't touch excel books, they are constantly changed by other people. I just automate its padding and run a macro that I don't think
 

pepepito78

New member
Local time
Today, 16:51
Joined
Mar 7, 2020
Messages
15
thanks, but i don't touch excel books, they are constantly changed by other people. I just automate its padding and run a macro that I don't think
 

CJ_London

Super Moderator
Staff member
Local time
Today, 15:51
Joined
Feb 19, 2013
Messages
16,668
OK, well I don't think I can help. it is just pure guesswork, there are too many variables

If all you are doing is setting padding or some other properties, you can do that from Access, you don't need an excel macro, just an excel object within access vba.

Perhaps someone else can chip in and make some suggestions

good luck with your project
 

Gasman

Enthusiastic Amateur
Local time
Today, 15:51
Joined
Sep 21, 2011
Messages
14,446
Well in your situation, shouldn't the person who wrote the macro be getting to the bottom of why it errors and not you?
 

pepepito78

New member
Local time
Today, 16:51
Joined
Mar 7, 2020
Messages
15
Yes, but they still make mistakes, they are usually inexperienced commercials. My intention is that when the error occurs, my application is not left waiting to press accept in the error message, I want it to continue working and create an incident. Thank you anyway
 

Users who are viewing this thread

Top Bottom