Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: Can I add a msgbox or something while is finishing a procedure?

Status
Not open for further replies.

RovirozM

Technical User
Dec 9, 2009
37
MX
Hi Guys,

Just curious, I have an Excel Application that when I push a command button it runs severals processes (Around 30-45 seconds).

Can I put a messagebox that says "Be patient.. etc" and then when the process finish to release this messagebox?

It is because takes time and just the hour glass mouse pointer is there but not so visible...

Thanks!
 
Use a modeless userform.

Create a userform with the required message, and change its ShowModal property to false.

Put a call to your main processing in the userform activate event, like:
Code:
Private Sub UserForm_activate()
    DoMyProcessing
End Sub
and put a
Code:
DoEvents
in the beginning of your main processing, and a
Code:
Unload UserForm1
at the end.

Make you command button show the user form, like:
Code:
UserForm1.Show

That should do it.

Cheers, Glenn.

Beauty is in the eye of the beerholder.
 
You can display messages with Application.StatusBar too (in case of loop the percentage done for instance).

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top