ich hab da so einen kleine frage.
Und zwar habe ich einen Excel liste mit Activex Checkbox 186 Stück an der Zahl (es können maximal 62 stück Angewählt werden.
Ich schreibe gerade ein Makro was die CB´s gegeneinander Verriegelt die ersten 62 Cb´s habe ich schon verriegelt. (immer 2 sind gegeneinander verriegelt)
Jetzt kommt der schwierige teil die restlichen 124 stück sollen in 4er paaren Verriegelt werden, das heißt folgenden Makro muss ich 31 mal einfügen und überarbeiten. Das muss doch einfacher gehen als Copy&Past und per Hand bearbeiten.
Private Sub CheckBox63_Click()
If CheckBox63.Value = False Then
CheckBox64.Enabled = True
CheckBox65.Enabled = True
CheckBox66.Enabled = True
End If
If CheckBox63.Value = True Then
CheckBox64.Enabled = False
CheckBox65.Enabled = False
CheckBox66.Enabled = False
End If
End Sub
Private Sub CheckBox64_Click()
If CheckBox64.Value = False Then
CheckBox63.Enabled = True
CheckBox65.Enabled = True
CheckBox66.Enabled = True
End If
If CheckBox64.Value = True Then
CheckBox63.Enabled = False
CheckBox65.Enabled = False
CheckBox66.Enabled = False
End If
End Sub
Private Sub CheckBox65_Click()
If CheckBox65.Value = False Then
CheckBox64.Enabled = True
CheckBox63.Enabled = True
CheckBox66.Enabled = True
End If
If CheckBox65.Value = True Then
CheckBox64.Enabled = False
CheckBox63.Enabled = False
CheckBox66.Enabled = False
End If
End Sub
Private Sub CheckBox66_Click()
If CheckBox66.Value = False Then
CheckBox64.Enabled = True
CheckBox65.Enabled = True
CheckBox63.Enabled = True
End If
If CheckBox66.Value = True Then
CheckBox64.Enabled = False
CheckBox65.Enabled = False
CheckBox63.Enabled = False
End If
End Sub