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 / Compatibility issues b...
Power Automate
Unanswered

Compatibility issues between Power Automate Desktop and Excel VBA under Windows 11 25H2

(1) ShareShare
ReportReport
Posted on by 407
This is the result I obtained after reinstalling Windows 11 Professional twice at the beginning of the month, after two weeks of repeated testing and verification, and finally after consulting with Copilot:
 
Environment:
• Windows 11 25H2 (clean install)
• Excel VBA: 20 independent files were backtested in parallel. All files were used locally, with no OneDrive/cloud locations, and no internal or external links, add-ins, or plug-ins.
• Power Automate Desktop (PAD)

Reproduction Steps:
1. Install PAD, with PAD.Service resident.
2. Execute the PAD process to manipulate Excel, while simultaneously executing multiple VBA operations.
3. After prolonged backtesting, an Automation Error randomly occurred.
 
Expected Result:
• VBA should execute stably, unaffected by PAD.
 
Actual Result:
• In a clean install of 25H2, an Automation Error randomly occurred when the PAD process and VBA were running in parallel.
• If only PAD.Service was resident and the PAD process was not executed, the VBA had no errors.
• In an upgraded environment (not a clean install), PAD and VBA coexisted normally.
 
Conclusion:
• The problem is not simply with PAD or 25H2, but rather a compatibility gap between the UI/COM injection in PAD and the new COM management in 25H2.
• It is recommended that Microsoft examine the COM/UI behavior of PAD and 25H2 and improve compatibility.
 
Strip 2.jpg

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

I have the same question (0)
  • trice602 Profile Picture
    16,298 Super User 2026 Season 1 on at
    Thanks for sharing!
  • alee001 Profile Picture
    407 on at
    After the following process is completed, a VBA Automation Error will occur after a period of time, regardless of whether the PAD is terminated or not, causing VBA to function normally.
     
    Automated Execution of 20 Portfolio Trading Strategies
       
    Note: Pre-open files Trading System ver3.3.4.xlsb, Trading System ver3.3.4_02.xlsbTrading System ver3.3.4_20.xlsb
    Flow version: TS_portfolio v1.1      
             
    Main Flow      
    Step
    Action Capture Variable Parameters / Value Settings
    1 Set variable   total_TS Name = total_TS; Value = 20
    2 Show list selection dialog   Sel_row
    ButtonPressed2
    Title = Portfolio Trading Strategy; Message = Select item row; List = 30, 31; Keep = Off; Limit = On; Blank = Off; Multiple = Off
    3 IF     First = %ButtonPressed2%; Operator = Equals (=); Second = Cancel
    4 Show message     Title = Abortive Backtest; Message = Cancel backtest.; Icon = Warning; Buttons = OK; Default = First; Keep = Off; Close = On; Timeout = 1
    5 Stop flow    
    6 End    
    7 Show message   ButtonPressed Title = Close System; Message = Auto close system or not after backtest?; Icon = Question; Buttons = Yes/No; Default = Second; Keep = Off; Close = Off
    8 Focus window     Mode = By title/class; Title = Trading System ver3.3.4.xlsb - Excel; Class = XLMAIN
    9 Send keys     Keys = {Apps}{Enter}; Target = Foreground window; Delay = 20; Hardware = Off
    10 Run subflow     Execute = Options; Input = Off
    11 Run subflow     Execute = Data; Input = Off
    12 Run subflow     Execute = Strategy; Input = Off
    13 Run subflow     Execute = Capital; Input = Off
    14 Region     Name = setting
    15 Loop   sel_no Variable = sel_no; Start = 2; End = %total_TS%; Increment = 1
    16 Pad text   TS_no Variable = TS_no; Source = sel_no; Pad = Left; PadChar = 0; Length = 2
    17 Focus window     Title = Trading System ver3.3.4_%TS_no%.xlsb - Excel; Class = XLMAIN
    18 Send keys     Keys = {Apps}{Enter}; Target = Foreground window; Delay = 20; Hardware = Off
    19 Run subflow     Execute = Options; Input = Off
    20 Run subflow     Execute = Data; Input = Off
    21 Run subflow     Execute = Strategy; Input = Off
    22 Run subflow     Execute = Capital; Input = Off
    23 End loop    
    24 End region    
    25 Region     Name = backtest
    26 Focus window     Title = Trading System ver3.3.4.xlsb - Excel; Class = XLMAIN
    27 Move mouse to image Button Result Target = Result; Move = Immediate; Click = Left; Appear = On; Timeout = 5; Algorithm = Basic; Position = Center; Allow = 10; Search = Entire screen; Mode = Entire/Foreground
    28 Loop   sel_no Variable = sel_no; Start = 2; End = %total_TS%; Increment = 1
    29 Pad text   TS_no Variable = TS_no; Source = sel_no; Pad = Left; PadChar = 0; Length = 2
    30 Focus window     Title = Trading System ver3.3.4_%TS_no%.xlsb - Excel; Class = XLMAIN
    31 Mouse click     Event = Left button; Wait = 0; Move = Off
    32 End loop    
    33 End region    
    34 Show message   ButtonPressed3 Title = Portfolio Backtest; Message = %TS_no% of portfolio backtest to result.; Icon = Info; Buttons = OK; Default = First; Keep = Off; Close = Off
             
    Data Subflow      
    Step
    Action Capture Variable Parameters / Value Settings
    1 Send keys     Keys = {Enter}; Target = Foreground window; Delay = 20; Hardware = Off
    2 Wait     Duration = 1
    3 Wait for window     Title = Select data file; Class = XLMAIN; Wait = Open; Focus = Off; Fail = Off
    4 IF     First = %sel_no%; Operator = Equals (=); Second = 0
    5 Set clipboard text     Text = C:\Users\WKLI\Documents\data100\d001.xlsm
    6 Send keys     Keys = {Ctrl+V}{Enter}; Target = Foreground window; Delay = 20; Hardware = Off
    7 Wait     Duration = 2
    8 Focus window     Title = Trading System ver3.3.4.xlsb - Excel; Class = XLMAIN
    9 ELSE    
    10 Set clipboard text     Text = C:\Users\WKLI\Documents\data100\d0%TS_no%.xlsm
    11 Send keys     Keys = {Ctrl+V}{Enter}; Target = Foreground window; Delay = 20; Hardware = Off
    12 Wait     Duration = 2
    13 Focus window     Title = Trading System ver3.3.4_%TS_no%.xlsb - Excel; Class = XLMAIN
    14 End IF    
    15 Move mouse to image Check box Markets list Target = Markets list; Click = Left; Timeout = 5; Search = Entire screen
    16 Move mouse to image Button Add Target = Add; Click = Left; Timeout = 5; Search = Entire screen
             
    Strategy Subflow      
    Step
    Action Capture Variable Parameters / Value Settings
    1 Move mouse to image Button Strategy Target = Strategy; Click = Left; Timeout = 5; Search = Entire screen
    2 Send keys     Keys = {Next:5}; Target = Foreground window; Delay = 20; Hardware = Off
    3 Move mouse to image Tile Strategy item Target = Strategy item; Click = Left; Timeout = 5; Search = Entire screen
    4 IF     First = %Sel_row%; Operator = Equals (=); Second = 30
    5 Send keys     Keys = {Down}; Target = Foreground window; Delay = 20; Hardware = Off
    6 ELSE    
    7 Send keys     Keys = {Down:2}; Target = Foreground window; Delay = 20; Hardware = Off
    8 End IF    
    9 IF     First = %ButtonPressed%; Operator = Equals (=); Second = Yes
    10 Move mouse to image Check box Auto close Target = Auto close; Click = Left; Timeout = 5; Search = Entire screen
    11 End IF    
    12 Move mouse to image Button Setting OK Target = Setting OK; Click = Left; Timeout = 5; Search = Entire screen
    13 Send keys     Keys = {Enter}; Target = Foreground window; Delay = 20; Hardware = Off
             
    Capital Subflow      
    Step
    Action Capture Variable Parameters / Value Settings
    1 Move mouse to image Button Capital Target = Capital; Click = Left; Timeout = 5; Search = Entire screen
    2 Move mouse to image List box Market Target = Market; Click = Left; Timeout = 5; Search = Entire screen
    3 Send keys     Keys = {Down}100; Target = Foreground window; Delay = 20; Hardware = Off
    4 Move mouse to image Input box HKD Target = HKD; Click = Left; Timeout = 5; Search = Entire screen
    5 Send keys     Keys = 200000{Enter}; Target = Foreground window; Delay = 20; Hardware = Off
    6 Move mouse to image Button Equalistation Target = Equalisation; Click = Left; Timeout = 5; Search = Entire screen
    7 Send keys     Keys = {Left}; Target = Foreground window; Delay = 20; Hardware = Off
    8 Move mouse to image Button Capital OK Target = Capital OK; Click = Left; Timeout = 5; Search = Entire screen
    9 Send keys     Keys = {Enter}; Target = Foreground window; Delay = 20; Hardware = Off
             
    Options Subflow      
    Step
    Action Capture Variable Parameters / Value Settings
    1 Move mouse to image Button Options Target = Options; Click = Left; Timeout = 5; Search = Entire screen
    2 Send keys     Keys = {Enter}; Target = Foreground window; Delay = 20; Hardware = Off
    3 Move mouse to image Tile Portfolio Target = Options; Click = Left; Timeout = 5; Search = Entire screen
    4 Send keys     Keys = {Enter}; Target = Foreground window; Delay = 20; Hardware = Off

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard