Private
Sub
Button_Ok_Click()
Range(
"A:A"
).
Select
Selection.ClearContents
Rows(
"3:3"
).
Select
Range(Selection, Selection.
End
(xlDown)).
Select
Selection.ClearContents
ActiveSheet.Cells(2, 1).Value = Eingabefenster.TextBox_CS_Auftrag.Value
ActiveSheet.Cells(1, 1).Value = Eingabefenster.TextBox_CS_Auftrag.Value
ActiveSheet.Calculate
If
ActiveSheet.Cells(2, 17) =
True
Then
ActiveSheet.Range(
"A2:Q2"
).
Select
Application.CutCopyMode =
False
Selection.AutoFill Destination:=Range(
"A2:Q3"
), Type:=xlFillDefault
ActiveSheet.Range(
"A2:Q3"
).
Select
Range(
"A1:A2"
).
Select
Selection.AutoFill Destination:=Range(
"A1:A3"
), Type:=xlFillDefault
Else
End
If
If
ActiveSheet.Cells(3, 17) =
True
Then
ActiveSheet.Range(
"A2:Q2"
).
Select
Application.CutCopyMode =
False
Selection.AutoFill Destination:=Range(
"A2:Q4"
), Type:=xlFillDefault
ActiveSheet.Range(
"A2:Q4"
).
Select
Range(
"A1:A2"
).
Select
Selection.AutoFill Destination:=Range(
"A1:A4"
), Type:=xlFillDefault
Else
End
If
If
ActiveSheet.Cells(4, 17) =
True
Then
ActiveSheet.Range(
"A2:Q2"
).
Select
Application.CutCopyMode =
False
Selection.AutoFill Destination:=Range(
"A2:Q5"
), Type:=xlFillDefault
ActiveSheet.Range(
"A2:Q5"
).
Select
Range(
"A1:A2"
).
Select
Selection.AutoFill Destination:=Range(
"A1:A5"
), Type:=xlFillDefault
Else
End
If
If
ActiveSheet.Cells(5, 17) =
True
Then
ActiveSheet.Range(
"A2:Q2"
).
Select
Application.CutCopyMode =
False
Selection.AutoFill Destination:=Range(
"A2:Q6"
), Type:=xlFillDefault
ActiveSheet.Range(
"A2:Q6"
).
Select
Range(
"A1:A2"
).
Select
Selection.AutoFill Destination:=Range(
"A1:A6"
), Type:=xlFillDefault
Else
End
If
Unload Eingabefenster
End
Sub