How to click OK in excel pop up

Hello. I have created a simple workflow where I open Excel and run a macro. The macro give me a message box and tell me to click ok. What is the best way to automate the “OK-clicking”?

A. If possible disable the MessageBox pop up in the VBA (absolutely pointless for an automated process).

B. You can use simple UI to physically click the Message Box OK button.

C. If the above fails, try sending a hotkey of Enter to the messagebox specifically.

Thank you. I will look into your suggestions.

Hi richarddenton,

I have an Excel macro which is calculating for a few minutes and afterward, also a Popup appears. I tried all the suggested ways to solve this problem mentioned earlier, but nothing seems to work. UiPath doesn’t even run into an error and it just waits forever without reacting when the given popup appears.

image
image.png1539x461 32.3 KB

As working with Excel Macros is an extremely important ability of UiPath, I am wondering if anybody else run in this problem and has an alternative approach!?

PS: I tried also the Element Exists Approach without any luck. Not even the message box for false boolean appears…


image.png1633x652 45.3 KB

PPS: I am pretty sure that my selectors are accurate as you can verify them in the recent version of UiPath.

Use parallel activity. Run the macro and click on message box parallels :slightly_smiling_face:

1 Like

Thank you for the fast response Vivek, but as you can see from the first picture I tried that already without any luck!

I actually managed to click OK in the appearing message box now by using an “On Element appear” - activity. However, the after the message is gone the workflow doesn’t continue.
Its the last activity in my workflow but the execution doesn’t complete for some reason.
That’s my workflow right now:

1 Like

In First parallel run the macro and in second use click.

Ah sorry, you meant like this:
image

Well yeah, I tried that before also and it didn’t work. However, I solved the problem with the “On Element appear” - activity now.
Anyway thanks a lot @Vivek_Arunagiri!!

It worked now. I just changed the RepeatForever - Property to False and it work just like I wanted! Have a great day everyone

2 Likes