Share via

HELP: How can I display "Loading, Please Wait..." Message while user wait on some action using excel userform

Anonymous
2010-07-06T17:07:06+00:00

Hi All,

I want to display a "Loading, Please wait..." message when user performs an action on a userform and it takes time

to perform a certain action.

How can this be done?

Hope I made it clear.

Thanks in advance

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2010-07-06T19:44:18+00:00

Hey Tushar,

I tried inserting a Lable1 with caption "Loading . . . " and set the "Visible" property to false And then made it visible by inserting "Me.Label1.Visible = True" in "UserName_AfterUpdate()" Event (Here data is being pulled from access database once users input their ID in UserName field)

So basically the code is something like this:

Private Sub UserName_AfterUpdate()

Me.Label1.Visible = True

'Code to pull info from access

Me.Label1.Visible = False

End Sub

It doesnt display the Lable1 "Loading . . ." when I insert a username and it pulls from access db. Am I missing something here?

Thanks in advance

An alternative to showing/hiding the label would be to always leave it visible.  Start with no caption and change it appropriately to "Loading..."  When done change the caption back to the zero length string "".


Tushar Mehta (Technology and Operations Consulting)

www.tushar-mehta.com (Excel and PowerPoint add-ins and tutorials)

Microsoft MVP Excel 2000-Present

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

Anonymous
2010-07-06T19:41:02+00:00

A programmatic change to a userform layout requires a userform repaint and I find it also helps to let the OS process pending events.

So, use

me.label1.visible=true

me.repaint:doevents

Hey Tushar,

I tried inserting a Lable1 with caption "Loading . . . " and set the "Visible" property to false And then made it visible by inserting "Me.Label1.Visible = True" in "UserName_AfterUpdate()" Event (Here data is being pulled from access database once users input their ID in UserName field)

So basically the code is something like this:

Private Sub UserName_AfterUpdate()

Me.Label1.Visible = True

'Code to pull info from access

Me.Label1.Visible = False

End Sub

It doesnt display the Lable1 "Loading . . ." when I insert a username and it pulls from access db. Am I missing something here?

Thanks in advance


Tushar Mehta (Technology and Operations Consulting)

www.tushar-mehta.com (Excel and PowerPoint add-ins and tutorials)

Microsoft MVP Excel 2000-Present

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2010-07-06T19:24:59+00:00

    Hey Tushar,

    I tried inserting a Lable1 with caption "Loading . . . " and set the "Visible" property to false And then made it visible by inserting "Me.Label1.Visible = True" in "UserName_AfterUpdate()" Event (Here data is being pulled from access database once users input their ID in UserName field)

    So basically the code is something like this:

    Private Sub UserName_AfterUpdate()

    Me.Label1.Visible = True

    'Code to pull info from access

    Me.Label1.Visible = False

    End Sub

    It doesnt display the Lable1 "Loading . . ." when I insert a username and it pulls from access db. Am I missing something here?

    Thanks in advance

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2010-07-06T18:17:55+00:00

    Since you already have a userform showing, use some field in it (add a label if you have no available field) and use it to show your message.

    Hi All,

    I want to display a "Loading, Please wait..." message when user performs an action on a userform and it takes time

    to perform a certain action.

    How can this be done?

    Hope I made it clear.

    Thanks in advance


    Tushar Mehta (Technology and Operations Consulting)

    www.tushar-mehta.com (Excel and PowerPoint add-ins and tutorials)

    Microsoft MVP Excel 2000-Present

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2010-07-06T17:13:45+00:00

    How about

    MsgBox "Loading, Please wait...."

    Problem is this doesn't close itself.

    You could add a textbox to the user form with that message and hide or unhide it as needed.

    Or you could add the message to the Status bar

    Application.StatusBar = "Abc..."

    This returns the control to Excel:

    Application.StatusBar=False


    If this answer solves your problem, please check, Mark as Answered. If this answer helps, please click the Vote as Helpful button. Cheers Shane Devenshire

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments