How to use execute Macro

Hi Guys,

Can anyone please let me know how to use an EXECUTE MACRO activity, As I need to run it at the end of process?


Create a Macro and save in a location and give full path of the same… it will execute

As it says it takes macro name.

well i am not aware and have not tried with path it works or not. I have always tried it will only macro name till so far. :slight_smile:

Note - Can only be used in the Excel Application Scope activity.


1 Like

Yea correct, it is saying Macro name.

but i am curious how it detect the macro location, i am assuming macro must save in the same location where UiPath script saved.

you are using it inside an excel application scope so if you will pass only macro name it will execute that macro.


I tried it but its showing an error stating the Range does not exists. @aksh1yadav

can you share your .xaml with that Excel Macro File?
Generally, that .xlsm file will have macro in its sheets, so click on any sheet to view the macro name,

Pass that macro name in Run Excel Macro Command, then it will be executed


Try to run the macro with prefix as ThisWorkbook.YourMacroName if it is developed under Thisworkbook or SheetName.YourMacroname if it is inside particular sheet or just YourMacroName if it is created under Module.


Refer this post as well if nothing works

Hey @pavan.vuntla

Well here i have a sample workflow for your understanding.

i have a sample macro excel enabled file having a macro to sum of two columns A and B so by using execute macro it will add those two columns value and will write that into the Col C. (14.5 KB)

Note:- please enable macro alert if there will be a security warning will appear.


thank you @aksh1yadav

I need a help in Excel-Macro

Clarification 1: Rows and Columns are treated as image. How to click a cell? Please refer the below screenshot
Clarification 2: I need to click and expand ALL the (+) symbol in the excel sheet. Is it possible in UiPath?
Clarification 3: I have to Read the “i” column which I have selected. How to do? Any guess are welcome

You also gave workflow with a .XLSM file. Even that also gives the same behaviour. Please refer the below screenshot.

Any idea will help me a lot.

1 Like

I need to consolidate the two columns in excel using macro.
can anyone know on how to do it.

pls follow below ,