How to Use Element Exists and Excel Application Scope In parallel, for Excels with Pop-up Macro

I’m encountering this weird problem with my excel. I’m trying to open an excel file with a macro, which will pop-up a page. I want to add an element exists, to check if a certain message will appear on the pop-macro page. The problem is, the robot will get stuck on the excel application scope after opening the pop-up macro. I’ve tried adding them on a parallel activity, with the element exists, but it would always get stuck on the excel app scope and will not run the parallel activity of element exists.

Can you keep some delay to check before the element exist check to check if it appears or not.
In which case it will appear and in which it wont ?

I did, but it still the same. I even added a Log exception, which it also didn’t appear. The succeeding workflows won’t run, unless the pop-up is gone.

Can you provide the file without the data?
And also screenshot the pop up for us.

If possible try Esc key or any close the popup Send hot key it wont affect the data or any other operations after it.

Here’s the screenshot. The Micrsofot Visual Basic Pop will appear if the pop-up macro fails to open. I added the Element Exists in the left parallel, that will click the “End” button if this page pop up appears. The problem is, it doesn’t run the left parallel activity but gets stuck in excel app scope. It didn’t even displayed the “Checking for Pop Up Error” log message, before the parallel activity.

The parallel workflow on the left will only run if, I manually click the “End Button”

I would probably put it in a try catch
with the remote exception and then check for popup.

Does this happen when it’s opening the excel file or when the close workbook activity execute.?

When Opening the excel file. This is what I actually want to happen. I want it to throw an error if the message appears. I have a try catch on my main which invokes/calls this workflow. My only problem is that It won’t run the parallel code on the left. It should click the “End” Button then would throw an error. It get stuck in the excel app scope, it won’t even run the activities inside the excel scope, since it fails to open it thus, the workflow won’t timeout.

@Archie This error comes when there is a code error in the macro. To avoid this you should fix your macro code then this window does not pop up again. But may I know why do you handle this

Thanks. It is suppose to open a pop-up page where I’ll input some datas. I’m handling this since this Error Code 502920 would sometimes appear. Clicking the “End” Button would close the pop-up in which, I’ll throw and retry the process again.

you need to do it like this:

parallel process is correct, but the part where you are handling popup needs to be in a separate workflow

then you invoke that workflow and make sure ISOLATED property = True. Then it will not get stuck!

you can look at my example here, theres a template you can download

Thanks! The Workflows run in parallel with them now.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.