H o l a:
Private Sub CommandButton1_Click()
cmd = CommandButton1.BackColor
If cmd = vbBlue Then
CommandButton1.Caption = "hola1"
CommandButton1.BackColor = &HFFFF&
CommandButton1.ForeColor = vbRed
ElseIf cmd = &HFFFF& Then
'
CommandButton1.Caption = "hola2"
CommandButton1.BackColor = vbRed
CommandButton1.ForeColor = vbWhite
ElseIf cmd = vbRed Then
'
CommandButton1.Caption = "hola3"
CommandButton1.BackColor = vbGreen
CommandButton1.ForeColor = vbBlack
ElseIf cmd = vbGreen Then
'
CommandButton1.Caption = "hola4"
CommandButton1.BackColor = &H80FF&
CommandButton1.ForeColor = vbYellow
ElseIf cmd = &H80FF& Then
CommandButton1.BackColor = vbBlue
CommandButton1.ForeColor = vbMagenta
End If
End Sub
Private Sub UserForm_Initialize()
CommandButton1.BackColor = vbBlue
CommandButton1.Caption = "Hola"
End Sub