Private Sub Worksheet_Change(ByVal Target As Range) Dim chCheckbox As CheckBox If Target.Column = 1 Then If Target.Count = 1 Then If Target <> "" Then Set chCheckbox = ActiveSheet.CheckBoxes.Add(Cells(Target.Row, 5).Left, _ Cells(Target.Row, 5).Top, 20, Cells(Target.Row, 5).Height) chCheckbox.LinkedCell = Cells(Target.Row, 76).Address chCheckbox.Caption = "" End If End If End If End Sub
Private Sub Worksheet_Change(ByVal Target As Range) Dim chCheckbox As CheckBox If Target.Column = 1 Then If Target.Count = 1 Then If Target <> "" Then Set chCheckbox = ActiveSheet.CheckBoxes.Add(Cells(Target.Row, 2).Left, _ Cells(Target.Row, 2).Top, 20, Cells(Target.Row, 2).Height) chCheckbox.LinkedCell = Cells(Target.Row, 76).Address chCheckbox.Caption = "" chCheckbox.Left = Columns(2).Left + (Columns(2).ColumnWidth + chCheckbox.Width) / 2 Else For Each chCheckbox In ActiveSheet.CheckBoxes If chCheckbox.TopLeftCell.Address = Cells(Target.Row, 2).Address Then chCheckbox.Delete Exit For End If Next chCheckbox End If End If End If End Sub
chCheckbox.Display3DShading = True
58.4k Fragen
249k Antworten
7k Nutzer