Command Button Blink Color

Joined
Mar 28, 2011
Messages
1
Reaction score
0
Hello i use excel 2003 with the follow code :

Private Sub CommandButton1_Click()
If (CommandButton1.BackColor = &H8000&) Then
CommandButton1.BackColor = &HFF&
Sheet2.Cells(2, 3) = "Red"
ElseIf (CommandButton1.BackColor = &HFF&) Then
CommandButton1.BackColor = &HFFFF&
Sheet2.Cells(2, 3) = "Yellow"
ElseIf (CommandButton1.BackColor = &HFFFF&) Then
CommandButton1.BackColor = &H404080
Sheet2.Cells(2, 3) = "Brown"
ElseIf (CommandButton1.BackColor = &H404080) Then
CommandButton1.BackColor = &H808080
Sheet2.Cells(2, 3) = "Gray"
ElseIf (CommandButton1.BackColor = &H808080) Then
CommandButton1.BackColor = &HFF0000
Sheet2.Cells(2, 3) = "Blue"
ElseIf (CommandButton1.BackColor = &HFF0000) Then
CommandButton1.BackColor = &H80FF&
Sheet2.Cells(2, 3) = "Orange"
ElseIf (CommandButton1.BackColor = &H80FF&) Then
CommandButton1.BackColor = &H8000&
Sheet2.Cells(2, 3) = "Green"

End If
End Sub

if i click in commandbutton1 then change the colors but if the commandbutton1 change to the color "red" then blink.

what i want just blink on "red" not on the others colors.
 

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