BestSumy
BestSumy

Reputation: 23

A question about Power Automate to proceed macro from another excel file

Hello I am a newbie that working on a project that requires to use Power automate desktop to analyze data in the excel worksheet. The project needs me to download a excel file from website and proceed with macro. Now I am able to download file from website and macro script has been tested without problem. So here comes the problem, I couldn't figure out how to use power automate to run macro from another excel file.

So let's say there are two excel file a.xlsm and b.xlsm and both store in download folder. The a.xlsm will always been the download file from website and b.xlsm will be the file that I already store the macro. I need to open a.xlsm and run the macro store in b.xlsm. Thanks for any suggestion in advance.

Upvotes: 1

Views: 915

Answers (1)

BestSumy
BestSumy

Reputation: 23

Ok I figure it out, here is the step you may follow.

  1. Record Macro
  2. Stop recording the Macro
  3. Click Macros under developer section (or press Alt + F11)
  4. Find the Module 1 under VBAProject (PERSONAL.XLSB (Default name))
  5. Copy your finished script and paste into the module1
  6. In the run excel macro function in Power Automate Desktop, put that code after Macro: 'PERSONAL.XLSB'!**** (**** will be the macro function you want to run)

note: please remember every time you want to run the macro you have to open the original worksheet which contains the macro, otherwise you won't be able to run it

Upvotes: 1

Related Questions