How to make caption of command button blink?

G

Guest

I have an on-screen reminder in the form of a command button. I need the
caption on the button to blink. How do I do this? Do I use the timer event of
the form?
 
A

Arvin Meyer [MVP]

Yes, use the Timer event. But don't flash it too often or your users will
throw their monitors at you.

http://www.web42.com/badday/badday_small.mpg

This is the code you'll need:

Private Sub Form_Timer()
Dim j As Integer

For j = 1 To 5
If Me.Command1.Caption = "Whatever" Then
Me.Command1.Caption = ""
Me.TimerInterval = 500
Else
Me.Command1.Caption = "Whatever"
Me.TimerInterval = 2500
End If
Next j

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top