



Còn màu chữ được không bạnif CommandButton.caption="ON" then
CommandButton.caption = "OFF"
else
CommandButton.Caption = "ON"
End if




Private Sub CommandButton1_Click()
With Sheet1.CommandButton1
If .Caption = "ON" Then
.Caption = "OFF"
.ForeColor = &HFF00&
Else
.Caption = "ON"
.ForeColor = &HFF&
End If
End With
End Sub
Cám ơn rất nhiều nhaMình xài Office 2010 thì cái màu nó ra như thế. Không biết trên Office khác nó có khác không thì mình chịu !
Mã:Private Sub CommandButton1_Click() With Sheet1.CommandButton1 If .Caption = "ON" Then .Caption = "OFF" .ForeColor = &HFF00& Else .Caption = "ON" .ForeColor = &HFF& End If End With End Sub