ich habe eine UserForm mit Textfeldern, OptionButtons und auch Checkboxen. Bei Klick auf Speichern werden entsprechende Daten in die Excel Liste eingefügt.
Nun zu den CheckBoxen: Wenn ich die erste CheckBox nicht auswähle, die folgenden allerdings schon, dann ist vor dem ersten Wert ein Komma.
Gibt es eine elegante Möglichkeit das Komma zu entfernen, wenn vorherige Optionen nicht gewählt sind. Normalerweise soll das Komma die verschiedenen Begriffe trennen, wenn die vorherige Option allerdings nicht ausgewählt ist, soll es nicht auftauchen.
Momentan sieht es so aus, vielleicht kann mir ja jemand helfen:
If CheckBox_RD.Value = True Then Cells(last, 7).Value =
CheckBox_RD.Caption
If CheckBox_FW.Value = True Then Cells(last, 7).Value =
Cells(last, 7).Value & " , " & CheckBox_FW.Caption
If CheckBox_POL.Value = True Then Cells(last, 7).Value =
Cells(last, 7).Value & " , " & CheckBox_POL.Caption
If CheckBox_KV.Value = True Then Cells(last, 7).Value =
Cells(last, 7).Value & " , " & CheckBox_KV.Caption
If CheckBox_PD.Value = True Then Cells(last, 7).Value =
Cells(last, 7).Value & " , " & CheckBox_PD.Caption
If CheckBox_BZP.Value = True Then Cells(last, 7).Value =
Cells(last, 7).Value & " , " & CheckBox_BZP.Caption