How to deal with Popup generated from a Excel Macro?

excel
macro

#1

Hi Everyone,

I’m executing a macro, but when the macro find a error in the file a error message is generated (will of the developer) , the Execute Macro seems to run indefinitely wait for someone to click on OK and continue like is there is no error.

Try catch does not works because it does not fail the activity, is there any way to detect those kind of Popup ?

Thank you for your help/time.

Best regards.
Peter


How to manage an unexpected window?
#2

Hi Peter,

Are the number of Pop-ups that you receive is limited?
If it is limited, then you can use activities like Element Exists or Image Exists or On Element/Image appears activity to find those Pop-ups and act on it when they appear.

But then the question will be when will you trigger these activities or when to sequence them. Typically, you need to run these activities in parallel when you start executing the macro.

Thanks

Regards
Tejus V


#3

Thanks @TejusVenkatesh,

I will look into the parallel activity, it might be what i need.
And yes i’m supposed to only encounter one type of Pop-up.

Regards.
Peter


#4

I’m having the same problem.
Looking for an elegant solution.
Did the parallel activity solve the problem ?

Hugh


#5

Great solution, @TejusVenkatesh

Parallel Activity has always worked for me in these types of situations.