Userformen und deren Steuerelemente
Befehl / Beispiele Beschreibung
  Kontrollkästchen
Sub KontrollKaestechen()
    Dim KK_Name   As String
    Dim KK_Makro  As String
    Dim KK_Aktiv  As Boolean
    Dim KK_Text   As String

    Dim KK   As Shape
    Set KK = ActiveSheet.Shapes("<Name des Kontrollkästchen>")

    Sichtbar = KK.DrawingObject.Visible
               KK.DrawingObject.Border.LineStyle = 1                           ' Rahmen
               KK.DrawingObject.Border.Color = RGB(255, 0, 0)                  ' Rahmenfarbe
               KK.DrawingObject.Border.Weight = 4                              ' Rahmendicke
               KK.DrawingObject.Interior.Color = RGB(0, 255, 0)                ' Hintergrundfarbe
               KK.DrawingObject.Interior.Color = RGB(0, 255, 0)                ' Hintergrundfarbe
               KK.DrawingObject.Left = 10                                      ' Abstand linker Rand
               KK.DrawingObject.Top = 100                                      ' Abstand oberen Rand
               KK.DrawingObject.Width = 100                                    ' Objektbreite
               KK.DrawingObject.Height = 15                                    ' Objekthöhe
     KK_Name = KK.DrawingObject.name                                           ' Objektname
    KK_Makro = KK.DrawingObject.OnAction = "Makroname"                         ' verlinktes Makro
    KK_Aktiv = IIf(KK.DrawingObject.Value = xlOn, True, False)                 ' Häkchen vorhanden oder nicht
     KK_Text = KK.TextFrame.Characters.Text                                    ' Text in der Schaltfläche
End Sub