Hello,
I wonder how the following code must be updated so the back color is:
1st click: yellow
2nd click: red
3rd click: blue
4th click: yellow
etc.
Thank you, MalakCode:Sub btnMyButton_Click()
' The background color is gray at the beginnng
If frmMyForm.BackColor <> vbYellow Or frmMyForm.BackColor = vbRed Then
frmMyForm.BackColor = vbYellow
Else
frmMyForm.BackColor = vbRed
End If
End Sub