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 / Argument 'WindowInstan...
Power Automate
Answered

Argument 'WindowInstance' must be an integer value.

(0) ShareShare
ReportReport
Posted on by 11

Hello all,

 

I'm creating a flow and the first part is to understand if Excel is open or not using the IF Window.

BruKn0ws_1-1637187641748.png

 

If it's open then run one sub flow, if it's not open run another sub-flow(that Launches Excel).

I'm getting error "Argument 'WindowInstance' must be an integer value."

 

Please help.

  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    I have this, and it works, but it is set up differently.

     

    Attach to running Excel

    On Error - Go to Subflow - Launches Excel - Go to next action

    MichaelAnnis_0-1637188309884.png

    So, above is the "On Error" screen for "Attach to Running Excel".  If it can't find what I told it to attach to, it goes to the subflow "Err_OpenMorningStarAll" which just has a single Launch Excel command, then it resumes with the rest of the original subflow.

     

    Best of luck!

  • BruKn0ws Profile Picture
    11 on at

    Great idea! Didn't remember using the "on error". Thank you!

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
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 211 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 190

Last 30 days Overall leaderboard