求助。IF语句用法~~
想实现 当我点Command1(默认蓝色)的时候 Command3 和 Command5 变成红色
当我再点Command1变成红色 Command3 和 Command5 变成蓝色
当我再点Command1变成蓝色 Command3 和 Command5 变成红色
不断循环 怎么做 请求大鸟帮忙
Dim a As Integer
Private Sub Command1_Click()
a = a + 1
If a = 1 Then
Command1.BackColor = &HFF&
Command3.BackColor = &HFF0000
Command5.BackColor = &HFF0000
End If
If a = 2 Then
Command1.BackColor = &HFF0000
Command3.BackColor = &HFF&
Command5.BackColor = &HFF&
a = 0
End If
End Sub