cariobulog
Technical User
Anyone could help me how i can make my command button background color changing everytime i click it.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub CommandButton0_Click()
If Me.CommandButton0.BackColor = vbRed Then
Me.CommandButton0.BackColor = vbGreen
Else
If Me.CommandButton0.BackColor = vbGreen Then
Me.CommandButton0.BackColor = vbBlue
Else
Me.CommandButton0.BackColor = vbRed
End If
End If
End Sub
Private Sub cmdbtn_Click()
Select Case Me.cmdbtn.BackColor
Case Is = vbRed
Me.cmdbtn.BackColor = vbGreen
Case Is = vbGreen
Me.cmdbtn.BackColor = vbBlue
Case Is = vbBlue
Me.cmdbtn.BackColor = 450
Case Is = 450
Me.cmdbtn.BackColor = 0
Case Else
Me.cmdbtn.BackColor = vbRed
End Select
End Sub
Private Sub CommandButton0_Click()
End Sub
If Me.CommandButton0.BackColor = vbRed Then
Me.CommandButton0.BackColor = vbGreen
Else
If Me.CommandButton0.BackColor = vbGreen Then
Me.CommandButton0.BackColor = vbBlue
Else
Me.CommandButton0.BackColor = vbRed
End If
End If