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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make a label on a form flash 2

Status
Not open for further replies.

yankinsf

Technical User
Sep 25, 2003
15
US
How do I make a label on a form flash?
Appreciate your response.

Sam
 
Sam,

You can use the form's Timer Event to toggle the background color of the label.

If you set the Timer Interval to 1000 then every second the color will change.

The code will look something like this -


Private Sub Form_Timer()

If Text0.BackColor = vbgray Then
Text0.BackColor = vbYellow
Else
Text0.BackColor = vbgray
End If

End Sub
 
Thanks for your tip,Steve,but since I am not accustomed to writing VBA code,is 'text0'in your code the label name?
 
Sam:

Yes - Text0 is the label on your form

I have developed many apps for different clients and never found a good enough reason to pester my users with flashing controls. Don't you hate it when you go to a web page and those HTML whores throw everything but the kitchen sink at you. Try to find a better way to direct your user.

Rick

 
Rick,
I completely agree with you about the flashing label nuisance.What I really wanted to do was have the label flash for 5 secs when the user opens up the Form and then stop flashing.
Is that possible?

Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top