Jump to content

How to handle #32770 in Excel While Minimized?


Recommended Posts

I have an error message that pops up occasionally in Excel. I am trying to write a script that will click on that error message when it appears. It works fine when Excel is the active window, but when it is minimized it doesn't work at all.

Here is the code I am using (gleaned off another thread here):

Global $s_title_of_popup = "Microsoft Excel"
Global $s_msgbox_class = "#32770"
Global $status
While 1
    WinWait("[Title:" & $s_title_of_popup & ";Class:" & $s_msgbox_class & "]")
    ControlClick("[Title:" & $s_title_of_popup & ";Class:" & $s_msgbox_class & "]", "", "Button1")
    sleep(5000)
WEnd

When I add a line to activate the window first, the script seems as if it is sending it to the main parent window, rather than the popup message.

I've attached a test excel macro to illustrate what I am talking about.

Can anyone help? Kind of clueless at this point.

Dialog_Test.rar

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...