Run Macro

Hi,

In my project i have 4 macros which i want to run and close as of now, i have written code for that but, it’s not working.also don’t know how to check whether it is working or notMain.xaml (9.0 KB)

can anyone reply fast?

u are specify only one macro…

so at a time i should specify all macros?

u want to run all macro one by one ryt?

@Rakesh_Tiwari

what error it coming?..
marco name is correct?

why did you give delay for long time

just to open excel file

@Rakesh_Tiwari

remove delay activity and try it

i specified all macros at a time, but it got stuck. it’s not happening anything.

@Rakesh_Tiwari

Did you removed Delay activity?

yes, it opened file and after some time it closed, how to see whether the macros are running or not

@Rakesh_Tiwari

if not running it will throw error…Remove try catch and check it

Hi @Rakesh_Tiwari

Try to save each macro as a text file and use INVOKE VBA activity where we can mention the Macro name
use n number of Invoke VBA activity based on the number of macros you have
or
you can save all the macros in a single text file and run them with the invoke vba
make sure that this invoke vba is kept within a excel application scope
and before this try to run those macros in the workbook manually and check whether its working or not
Cheers @Rakesh_Tiwari

can i give delay so that i can see whether macro is running or not?

@Rakesh_Tiwari

given delay in uipath not gonna to help you… you have to give in Excel Marco

otherwise
can you share the excel file for ours?
then we will check and let you know

it’s giving me this error

Main.xaml (9.6 KB)

i have updated the code

@Rakesh_Tiwari

Open your marco Excel file
Goto → View Option-> Click Marco->Click View Marco

conform it Marco are available or not

Check it once. Excel path is correct or not what ever you given in the Excel Application
Scope.

Otherwise That excel file is not confidential share to ours…we will check and tell u

ye, i checked and i ran manually also and it’s working as well.

Enable the Marco
Open excel file GoTo Option->Click Trust center->clickMarco Setting->Enable the marco
Save it