Supportnet / Forum / Tabellenkalkulation
ActiveX Befehlsschaltfläche (Command button)
Frage
Hallo!
Stehe vor einem Problem. Würde gerne einer Befehlsschaltfläche eine Farbe zuweisen, wenn in einer Kontrollbox ein Häkchen gesetzt wurde bzw. nicht gesetzt ist. Lässt sich das in Excel machen?
Wär super, wenn mir jemand weiterhelfen könnte.
Gruß
netubo
Antwort 1 von fürLau
Hallo
Das geht recht einfach:
Gruß
Das geht recht einfach:
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
CommandButton1.BackColor = RGB(127, 255, 127)
Else: CommandButton1.BackColor = &H8000000F
End If
End Sub
Gruß
Antwort 2 von netubo
Danke. Funktioniert. Super!

