I have 20 independent, open Excel2021 VBA files that need to execute buttons. After opening the PAD, I can only use UI elements or find the title to execute the focus window. Because the former's variable settings often fail, I choose the latter.
Since each VBA file's button has a progress window (execution time approximately several hours), there will eventually be 40 windows. However, I've noticed that the focus window switching becomes increasingly slow towards the end of the process, resulting in a 30-second wait before the button can be executed in the last window.
This problem didn't exist when using UI elements. Is this a flaw in the title-finding method? Are there any solutions or improvements? Thanks