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

Closed
Maxine S Posts 1 Registration date Friday May 24, 2013 Status Member Last seen May 24, 2013 - May 24, 2013 at 02:31 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - May 27, 2013 at 12:03 PM
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...
Related:

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
May 27, 2013 at 12:03 PM
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
0