Harley78
Electrical
- May 8, 2007
- 77
Me again,
I didn't want to bother you, but have tried and tried to get the command button to change color when I click it. Nothing is working... so I am asking, is it possible?
Private Sub Command1_Click()
counter = counter + 1
If counter = 1 Then
counter = counter - 1
End If
If counter = 1 Then
shpRed.BackColor = RGB(255, 0, 0)
shpAmber.BackColor = RGB(255, 255, 255)
shpGreen.BackColor = RGB(255, 255, 255)
ElseIf counter = 2 Then
shpAmber.BackColor = RGB(210, 100, 45)
ElseIf counter = 3 Then
shpGreen.BackColor = RGB(0, 140, 0)
shpRed.BackColor = RGB(255, 255, 255)
shpAmber.BackColor = RGB(255, 255, 255)
ElseIf counter = 4 Then
shpGreen.BackColor = RGB(255, 255, 255)
shpAmber.BackColor = RGB(210, 100, 45)
End If
End Sub
I didn't want to bother you, but have tried and tried to get the command button to change color when I click it. Nothing is working... so I am asking, is it possible?
Private Sub Command1_Click()
counter = counter + 1
If counter = 1 Then
counter = counter - 1
End If
If counter = 1 Then
shpRed.BackColor = RGB(255, 0, 0)
shpAmber.BackColor = RGB(255, 255, 255)
shpGreen.BackColor = RGB(255, 255, 255)
ElseIf counter = 2 Then
shpAmber.BackColor = RGB(210, 100, 45)
ElseIf counter = 3 Then
shpGreen.BackColor = RGB(0, 140, 0)
shpRed.BackColor = RGB(255, 255, 255)
shpAmber.BackColor = RGB(255, 255, 255)
ElseIf counter = 4 Then
shpGreen.BackColor = RGB(255, 255, 255)
shpAmber.BackColor = RGB(210, 100, 45)
End If
End Sub