Error during "execute macro"

Hi I am using win7 Enterprise and UI Path version 2016.2.6442.

When I am trying to execute a macro in the excel, I used the “execute marco” function under Excel. The macro did successful ran, but there was also an error popping out - This error is in the Excel level instead of UI Path level.


There was only one input box which is for the macro name - I assume I put the macro name correctly because the macro did get executed. However, my process cannot go any further with this error in the excel. I do believe the process is stuck at “execute macro” because of this error.

It is worth mentioning that if I open the VBA editor (Alt F11) and run this macro directly there, there is no problem/error whatsoever.

Any help/insight on this is appreciated!

Did you try creating a button in the Excel file and assigning the Macro to it and clicking the button to run it?

This looks like a problem where it couldn’t find a Cell or Range or something. Did you use the Execute Macro inside an Excel scope or not? I wonder if the file needs to be opened.

It would be helpful if you were able to click Debug and find the line where it is failing.

Hi ianhyj,
If you are able to run macro manually.
Please check UiPath activities if you used execute macro activity inside for each or inside loop then such problem happened please check your Activity’s again. because if VBA not find the Exact criteria then it’s throw an error Check Macro execute activity again. It happen because UIPATH activity’s which is inside of loop force macro to execute again and again and if excel value are not able to fulfill the criteria then it throw an exception.

Might be a bit unrelated, but i need help with a problem during Macro execution.

I have an Execute Macro inside an Excel Application Scope. It’s a printing macro, and since i don’t need it to execute during the development stage, i just click cancel when the popup window comes up. However, since i cancel the process, i get a macro Error, very much like the one at the top of this post, and from there UiPath gets stuck. I want the flow to continue to the new execution even though an error occurs, but now it just gets stuck until i click on the end/finish button in the popup error window.
I’ve tried using Delay and Throw inside a Parallel activity (an example i found on internet, which is supposed to work), but it still doesn’t throw the error until i click on the finish button and exit the error window.
The CompleteCondition in the parallel activity is set to True.

Any ideas to why this might be and how I can solve it?

Much appreciated.


Just a quick check, did you try Continue On Error property of Execute Macro Activity?

I remember trying it a while ago, and it didn’t work. I will try again just to check.

Hi! I have the same problem. The thing is that i have a success message in a form of popup and the robot will not go forward unless i click OK in the popup. The robot behaves as the execute macro activity is not finished.