Log in

View Full Version : Prevent multiple PickFolder windows



dma
03-16-2022, 03:36 PM
Hello,

I have a button on a userform that opens a 'Session.PickFolder' window. If you keep pressing the button it will open multiple windows.

What would be the best way to prevent this behavior and open only one instance regardless of how many clicks?

Thanks.

arnelgp
03-17-2022, 02:27 AM
maybe use API to check if the PickFolder window is already open.
set the window to Foreground if it does, otherwise open new instance.

dma
03-17-2022, 06:46 AM
I'll try that. Thank you arnelgp.