How to click on the VBA popup?

Hi,all.

I want to automate the following process.

  1. Start Excel.
  2. Click the OK button on the popup.

*This Excel Book has the following code, and a message dialog is displayed at startup.

Private Sub Workbook_Open()
ActiveWindow.ScrollRow = 1
MsgBox “Test”
End Sub

So I started Excel with ExcelScope and coded to click OK But there is no reaction.
The method of sending Enter as a hot key, or use the StartProcess function, also did not work.

Since it’s not possible to modify the VBA side, please tell me how to control the VBA button with UiPath.

Thanks in advance.

Main.xlsx (9.2 KB)

Similar:
https://forum.uipath.com/t/how-to-click-ok-in-excel-pop-up/

  1. Element exist
  2. if (true) then
  3. send hot key(enter)

Thank you for your reply.

Using the “Element Exist” function, if there is an object, I modified to send a hot key, but it still doesn’t work. Is there any other idea?
Main.xlsx (9.5 KB)

Thanks in advance.

Use Parallel Activity. On the one side execute macro, on the other click button.

1 Like

Thank you for your reply,solved!
The solution was to place “ClickActivity” on the far left of “ParallelActivity” and “ExcelScope” on its right side.

2 Likes

Oh my god, this did the trick, your a life saver!

Does not work for me…

Hey everybody,

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.

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…

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

I managed to figure it out.
Check out the following post!