Apparently there’s a bug when sending parameters with Execute Macro activity that causes the macro to not function properly (VBA methods like Copy and Insert don’t work). The development team is aware of the bug and is presumably working on it.
Have they mentioned anything about macros executing twice in error? That is my current issue. I am able to pass parameters fine and the macro runs but the Execute Macro activity runs through the macro for a second time once the first run finishes then moves on to the next activity. All my test project consists of is an Excel application scope, Execute Macro then a Message box activity which was testing to see if UiPath would wait for the macro to complete before moving on.
They didn’t say anything about macros executing twice. Can you provide an example to see if the behavior can be reproduced? I see you created a topic for this (Execute Macro Activity Runs Twice), so maybe you should post it there.
Yes. Looks like that is a bug. Passing parameters to the Excel macro as we do now is more like a hack. It will be proper implemented and launched in about two weeks.
Problem Statement:
While working on excel automation sometimes we are asked to use existing VBA macros created by the business users and those VBA macros asks for input parameters at the time of execution.
Limitation:
In Execute Macro activity there is no option to pass input parameters as an argument to the macro or getting the output of the macro into a variable.
Please have this functionality integrated in Execute Macro activity.
Try logging the value first so you can see exactly what the macro is executing. You may need to use four quotes instead due to the number of quotes required.
I already try and found a solution on this “‘Marin(“”" + msgbox + “”")’” (put a single quote on first after double quote and last before double quote) but I’m having a trouble now passing 2 arguments. The single quote is not working…
Once I figure again the solution I will post it here…
But if you already encounter this please help.
Thanks
Hi Frank_Mennink, did you find any solutions now how to execute macro passing two or more arguments? When I try passing 1 arguments it’s working but when I try t pass 2 o more it gives me an error.