cancel
Showing results for 
Search instead for 
Did you mean: 

Running Macro from BP

maneesh.vemula1
Level 5
Hi - I am trying to run a macro using MS-Excel VBO. The macro is stored as a personal macro workbook. It is in the format '.XLSB'. When i manually open the file - i am able to run the macro. But when i try to do it through the automation tool - I am getting an error stating that the macro does not exist or has been removed. Please assist.

Thanks in advance.

------------------------------
Maneesh Vemula

------------------------------
8 REPLIES 8

IshanMahajan
Level 7
Running Excel Macro might be painful sometimes, what i do is, Open the workbook by excel VBO and activate it, i have created a custom object which attaches to Excel window, i use the Send Keys to run macro(you will have to define the keyboard shortcuts for your macro) and i put a MsgBox line in last of macro code so BluePrism can identify that the Macro execution has been completed, this will also help you in not getting into infinite loop, which may occur with Excel VBO, Run Macro action.

I think there is one more excel VBO available which allows to run the macro with a parallel thread but it not part of standard installation and you may have to reach out to your Blue Prism Administrator to get that.

Hope this will help.

------------------------------
Ishan Mahajan
India
------------------------------

YassineLamarti
Level 2
Hello Maneesh,


I had the same issue, but finally I found how to resolve it in internet.

You can't use the action "Run Macro" in an excel with extention ".XLSB".  but if you are using the extention "XLSM", be sure that will works.

I hope that I helped you by my suggestion.

Regards,

------------------------------
Yassine Lamarti
Blue prism designer
Accenture
Africa/Casablanca
------------------------------

Hi Yassine,

Can you please elaborate how to do that, basically I want to run a macro through a file to multiple different files. I have seen run macro action but unable to work it out.

------------------------------
KULRANJAN SINGH NEGI
Associate Professional Programmer Analyst
DXC Technology
Asia/Kolkata
------------------------------

Hi 

create a fresh excel file with extension .xlsm and write your macro code to deal with mutlple files 




------------------------------
VamshiKrihsna Dasa
System Architect
Fujitsu India Consulting Pvt. Ltd.
------------------------------
VamshiKrihsna Dasa System Architect Fujitsu India Consulting Pvt. Ltd.

AmiBarrett
Level 12
If the macro doesn't change (and you have access to its source), you can theoretically add it in as a new action in the Excel VBO. I've had to do this for some other projects, but it technically goes against best-practice since any other process loading the VBO will also load this action into memory. If this is a concern for you, you could save a separate copy of the Excel VBO off and modify that one.

------------------------------
Ami Barrett
Sr Product Consultant
Blue Prism
Richardson, TX
------------------------------

Hi Mate,

I have a process where I need to open excel , the pivot is already created , only we need to change the reference range and refresh the sheet , how can we trigger this from blue prism 

if we create Macro recording and run the Macro from blueprism does this work ? but the excel files are dynamic 

------------------------------
SAINNATH SURAY
Business process Lead
TATA CONSULTANCY SERVICE
Asia/Kolkata
------------------------------

Hej Ishan 
Har du mulig for at sende din kode til mig 
Vh.

------------------------------
jess Madsen
------------------------------

@jess Madsen,

The Excel VBO on the Digital Exchange includes the action Ishan had referred to about running a macro with a parallel thread that checks for pop-ups (ex. error messages) and dismisses them. You can find the VBO here.

Cheers,​

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------