web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Cannot run a macro in ...
Power Automate
Unanswered

Cannot run a macro in an excel file that is opened through power automat desktop

(0) ShareShare
ReportReport
Posted on by 18

Hello everyone,

 

I am creating a PA desktop flow on a virtual machine. I enabled VBA macros in excel (100%). When I manually open the excel file I can run the Macro. When I open excel through Power Automate Desktop (Launch Excel) I cannot run the macro.

 

Error message:

5ar94T_3-1690976329370.png

 

I have noticed that when I open Excel through PA desktop, the file name becomes a prefix of the Macro name.

 

Does anyone have any idea what the problem could be?

  • Kaif_Siddique Profile Picture
    2,108 Super User 2024 Season 1 on at

    Hi,

     

    Hope macro is enabled in excel file.

    Kaif_Siddique_0-1690977432521.png

     

    Try to unblock file(if business allows as this is a security setting)

    Right-click on the file to access its properties and select Unblock.

    Kaif_Siddique_1-1690977527285.png

     

    Regards

    Kaif

  • 5ar94T Profile Picture
    18 on at

    Hi,

     

    Yes, Macro is enabled in excel file.

     

    I don't see unblock under properties:

    5ar94T_0-1690982292547.png

     

  • Kaif_Siddique Profile Picture
    2,108 Super User 2024 Season 1 on at

    are you facing issue in this file only?

    are you able to run macro in another file or create a new file with 1-2 lines of code and try to run it. 

     

  • 5ar94T Profile Picture
    18 on at

    I face this issue in every file I open through the Launch excel action. 

     

    Interesting, I can run the macro action when I open the excel file through the Run Application action. But that option doesn't work for me because I need an excel instance.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 430

#2
11manish Profile Picture

11manish 341 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 282

Last 30 days Overall leaderboard