How to handle dynamic waiting time?

I used ‘click’ action to trigger an excel button to run the macros behind it.
The duration of executing the macros depends on the network performance.

After this ‘click’ action, another ‘click’ action will follow.

The problem here is while the macros is running after the first click, UiPath will proceed to execute the next ‘click’ action.
Using the “Delay after” field in the properties might not always help because if the network performance is poor, it might take longer than the specified delay time.

Is there other way to handle dynamic waiting time?

You can use wait for element vanish or wait for element activity depending upon your requirements suppose you want to click when some element on the excel appears than you can use Wait for activity and vice versa

I don’t seem to be able to find “wait for element vanish” or “wait for element activity” in UiPath Studio.
Could you guide me how to get them? Thanks.

Hi, why you don’t use just a Excel Application scope and run the Macro Execute inside?

I have a similar flow, needs to run a macro, but always the consumed time is diferent and is related to data magnitude.

With excel scope and macro execute I never find errors.