How to click on the VBA popup?


#1

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/


Unable to close popup given by Macro
#2
  1. Element exist
  2. if (true) then
  3. send hot key(enter)

#3

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.


#4

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


#5

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


Close Excel Macro Pop-Up Box
#6

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