Loading... message box

mharper90

Board Regular
Joined
May 28, 2013
Messages
117
Office Version
  1. 365
Platform
  1. MacOS
I have a complex macro that takes several seconds to complete. It is activated by clicking the "Close & Save" command button in UserForm19. Due to the delay while the macro is working, I'd like to create a "Loading..." message that will let the user know that the macro has started and to please wait. Otherwise, it looks like Excel has frozen.

I started with a blank user form that just has a bolded label stating, "Loading... Please Wait.", but I can't get it to pop up overtop of the original user form (UserForm19) while the original user form is still performing the macro. Ideally I'd like the user to click the "Close & Save" button, the "Loading..." window would pop up over top of UserForm19, and then automatically go away at the same time as UserForm19 after all of the actions in the macro have been completed. Like I said, my attempts at this caused the original macro to pause until the user closed the "Loading..." user form, or the same when I tried it as a message box.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Instead of using a second UserForm, why not put a Label control displaying "Loading..." over top of all the controls (center the text horizontally and use leading LineFeeds to center the text vertically) either by drawing it last or using its ZOrder property, then set its Visible property to True when you start your load and set it back to False once the loading has completed.
 
Upvote 0
Instead of using a second UserForm, why not put a Label control displaying "Loading..." over top of all the controls (center the text horizontally and use leading LineFeeds to center the text vertically) either by drawing it last or using its ZOrder property, then set its Visible property to True when you start your load and set it back to False once the loading has completed.


I tried to implement this, but I can't get the new title to appear unless I insert a message box or something right after it. Even with screen updating set to true, it's like it doesn't care to show me the title, it just pauses while it thinks, and then eventually does the me.hide at the end of the macro.

Any ideas?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top