Private
Sub
CheckBox1_Click()
Application.ScreenUpdating =
False
If
CheckBox1.Value =
True
Then
Range(
"A3:R3"
).Copy
erste_leere_Zeile = Worksheets(
"Gesamt"
). _
Range(
"A13"
).
End
(xlUp).Offset(1, 0).Row
Worksheets(
"Gesamt"
).Cells(erste_leere_Zeile, 1). _
PasteSpecial Paste:=xlPasteFormulas
If
CheckBox1.Value =
False
Then
Range(
"B40000:AA40000"
).Delete
End
If
End
Sub
Private
Sub
CheckBox2_Click()
Application.ScreenUpdating =
False
If
CheckBox2.Value =
True
Then
Range(
"A4:R4"
).Copy
erste_leere_Zeile = Worksheets(
"Gesamt"
). _
Range(
"A13"
).
End
(xlUp).Offset(1, 0).Row
Worksheets(
"Gesamt"
).Cells(erste_leere_Zeile, 1). _
PasteSpecial Paste:=xlPasteFormulas
Range(
"B40000:AA40000"
).Delete
End
If
End
Sub
Private
Sub
CheckBox3_Click()
Application.ScreenUpdating =
False
If
CheckBox1.Value =
True
Then
Range(
"A5:R5"
).Copy
erste_leere_Zeile = Worksheets(
"Gesamt"
). _
Range(
"A13"
).
End
(xlUp).Offset(1, 0).Row
Worksheets(
"Gesamt"
).Cells(erste_leere_Zeile, 1). _
PasteSpecial Paste:=xlPasteFormulas
Range(
"B40000:AA40000"
).Delete
End
If
End
Sub
Private
Sub
CheckBox4_Click()
Application.ScreenUpdating =
False
If
CheckBox1.Value =
True
Then
Range(
"A6:R6"
).Copy
erste_leere_Zeile = Worksheets(
"Gesamt"
). _
Range(
"A13"
).
End
(xlUp).Offset(1, 0).Row
Worksheets(
"Gesamt"
).Cells(erste_leere_Zeile, 1). _
PasteSpecial Paste:=xlPasteFormulas
Range(
"B40000:AA40000"
).Delete
End
If
End
Sub
Sub
TransferData()
Dim
Dst
As
Worksheet, Src
As
Worksheet
Dim
ch
As
Object
Dim
nRow
As
Long
Dim
Ze
As
Long
Set
Src = Worksheets(
"Datenquelle"
)
Set
Dst = Worksheets(
"Gesamt"
)
With
Src
For
Each
ch
In
.OLEObjects
With
ch
If
.progID =
"Forms.CheckBox.1"
Then
If
.
Object
.Value =
True
Then
Ze = .TopLeftCell.Row
If
Src.Cells(Ze, 7) <>
True
Then
nRow = Dst.Cells(Rows.Count, 2).
End
(xlUp).Row + 1
For
i = 2
To
6
Dst.Cells(nRow, i - 1) = Src.Cells(Ze, i)
Next
i
Src.Cells(Ze, 7) =
True
End
If
End
If
End
If
End
With
Next
End
With
End
Sub