VBA - How to open a pop-up that does not stop the macro? [Closed]

Report
Posts
1
Registration date
Friday May 24, 2013
Status
Member
Last seen
May 24, 2013
-
Posts
2742
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
May 4, 2021
-
Hi everyone, I would like to add a pop-up (like MsgBox) but I don't want the macro to wait for the user to click on any button.
This mean a MsgBox saying something like "The macro is running, please wait ..." And once the macro is finished this pop-up window will close it-self without interaction from the user.
To my knowledge I guess I will have to use something close to a thread but I don't know if VBA allow this or not. Moreover it looks a bit complex to use a thread-like function just for this.

Any help is appreciate :)
Thx !

By the way, currently I'm doing this this way:

Open a msgbox saying "macro will run, click OK and wait for the next msg box"
Excel.Application.Visible = False 'Hide the running macro and Excel files
MACRO CODE
Excel.Application.Visible = True 'Unhide the running macro and Excel files
Msgbox saying "Macro is done"

It works but the user does not see anything running so he could think that nothing is running...

1 reply

Posts
2742
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
May 4, 2021
460
Hi Maxine,

Don't know if it's possible but I wanted the same thing (a while ago) so I created a hidden sheet (displaying a message to wait a while.).

The macro would then unhide and activate the hidden sheet.
Then the macro would kill the screenupdating.

At the end the macro hide the "hidden" sheet again and restored the screenupdating.

I know it's also possible to create a timed message box which would dissapear after a fixed amount of second.

Let me know if you need help with any of the two given options.

Best regards,
Trowa

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!