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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Batch Execution of Exc...
Power Automate
Unanswered

Batch Execution of Excel Files

(2) ShareShare
ReportReport
Posted on by 331
Suppose there are a batch of Excel files that need to execute VBA one by one (such as data_01.xlsm, data_02.xlsm, data_03.xlsm...)

In the old version of the process, you can use UI elements to set file name variables and select and execute through loops, but the current PAD version can no longer be used. How can I solve this problem?
 
Thank.
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
     
    Just to confirm whether i have understood the process
     
    So you have a VBA script which you are planning to execute on each excel file. Current design of process uses UI Automation approach where it enters the file name and execute the vba script.
     
     
     
    Correct me if am wrong.
     
    Also i did not understand  the issue you are facing ?
     
     
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • alee001 Profile Picture
    331 on at
    Hello, thanks for your reply.
     
    In my case, I have opened N VBA files in advance, and I need to use PAD to select the files in sequence and execute the button operations in VBA, while backtesting for several hours.

    In the past, I recorded a set of sample operation processes through UI elements, set the selector parameters as variables, and then used the [Focus Window] to select each file. However, after upgrading to Windows 24H2, the new version of PAD has changed the old rules and I cannot execute them.

    Now my problem is that I can't find an effective way in PAD to switch and select each VBA file in a loop?
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
     
    For a stable approach - you can trying doing same without UI Automation as well - using command prompt within PAD ?
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • alee001 Profile Picture
    331 on at
     
    All VBA buttons, forms/tables, options, filling in... and other manual tasks must be performed using UI elements.

    If the selector in the new rule UI element cannot set variables to loop and execute the [focus window], then opening N Excel files will require recording N processes. Can you imagine that?!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard