• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 838
  • Last Modified:

Make a label appear for only a few seconds

Is there a way to make a label appear for only a few seconds.
If so anyone's help on this would be greatly appreciated
1 Solution
To make a label on a form disappear after say 5 seconds, set the form TimerInterval property to 5000 and in the Form Timer event procedure do..

Me.yourlabelname.visible = false
me.timerinterval = 0 ' switch off timer
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
or use a routine like the one below.  Paste it into a module, then do:

Me.<myLabelcontrol>.Visible = True
Me.<myLabelcontrol>.Visible = False

If you're looking to have a generic message box, see the attached DB.


Public Function Wait(intSeconds As Integer) As Integer

        Dim datCurDateTime As Date
10      datCurDateTime = Now

20      Do Until DateDiff("s", datCurDateTime, Now) > intSeconds
30        DoEvents
40      Loop

End Function
"Is there a way to make a label appear for only a few seconds. "

First check above comments if any answer your question.

If not resolved then:

You did not clearly specify when to start counting  the few seconds?
How you do make it visible in the first place?
Any chance to make it visible again in the same session?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now