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 / PA cannot run Excel VB...
Power Automate
Answered

PA cannot run Excel VBA userform

(0) ShareShare
ReportReport
Posted on by 379

I tried to record the form buttons on userform in the Excel VBA file in order to automatic filling and setting, and found that the PA can only be executed after recording, and it cannot be executed after restarting the computer. I suspect that the UI of the captured userform is different or cannot be standardized?

 

pad03.jpg
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @alee001 

     

    You have to check your selector of ui element to see whether they are same or not / validating as well.

     

    Or

     

    Since you are trying to run an excel macro, use the below action as well to run the macro in the excel 

    Nived_Nambiar_0-1684029702845.png

     

     

    Hope it helps 

     

    Mark it as solution if it resolves your query !

     

  • alee001 Profile Picture
    379 on at

    Thks for your reply.

    I had tried to test UI element but not work, PA may be cannot track moving of the pane userform?

    Run the action macro of excel on PA is suit for single module only, it cannot work for multi-modules on userform.

     

    pad03a.jpg
  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @alee001 

     

    just re indicate the ui element and see if there is any difference between the two sets of selector?

     

    Also try to see if there is any possibility to run a macro using Run VBSCript action in power automate desktop 

     

     

  • alee001 Profile Picture
    379 on at

    If it is possible to reboot the UI, but it is equivalent to re-establishing everything (it takes half a day), the next time the computer is restarted, the PA still cannot be executed.
    I'm trying to find a way to automate a VBA userform in PA...

     

     

  • alee001 Profile Picture
    379 on at

    I found that the Class value of the UI element in the figure is the key to controlling everything in my VBA userform on PA, but I don’t know why it will have a different value every time the computer is restarted. Does the PA have a different value every time it starts to connect to the server? Can anyone explain and fix this value?

    pad03b.jpg
  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @alee001 

     

    if the class value is changing always , then make it dynamic using the option present in attribute 🙂

     

  • alee001 Profile Picture
    379 on at

    Thanks for your advice, I have set the all value of class as variables, but every time I restart the computer, I still have to rely on record UI elements to obtain dynamic values, and then modify the variables to execute PA.


    Is there a better way to fetch this value?

  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @alee001 

     

    First indicate the ui element again you will get selector. 

     

    Now restart the computer 

     

    again indicate same ui element, store that selector under ui element section

     

    Now compare both, via this way we can identify what changes are present in selector by which we can modify those.

     

    also share screenshot of both selectors so that i can help in figuring out the issue 🙂

     

     

  • alee001 Profile Picture
    379 on at

    Every time the computer is turned on/restarted, the dynamic value of Class must first be obtained by recording UI elements, and then copied into variables before the program can be executed. (as pictured)

    Is it possible to change an operator so that it takes a generic value?pad03c4.jpg

  • alee001 Profile Picture
    379 on at

    Originally, I planned to use PA to start 20 independent Excels for backtesting, but found that the execution of PA took more than two hours, and it took ten minutes to do it manually! OMG


    I found that when VBA does too much backtesting, the program executed by PA slows down almost to a standstill... totally unusable.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard