Public
Sub
Test()
Dim
Zeile
As
Long
Dim
ZeileOut
As
Long
Dim
letzte_zeile
As
Long
Dim
Eingabedatum
As
String
With
Application
.ScreenUpdating =
False
.EnableEvents =
False
.Calculation = xlCalculationManual
End
With
Sheets(
"Umrechnung FP"
).Activate
sprung1:
Dateneingabe.Show
If
Eingabedatum =
""
Then
z = MsgBox(
"Die Eingaben sind nicht vollständig!"
, vbCritical + vbOKCancel,
"Achtung!"
)
If
z = 1
Then
GoTo
sprung1
Else
Exit
Sub
End
If
End
If
If
Range(
"A2"
).Value =
"D"
Then
Sheets(
"FP(0)"
).UsedRange.ClearContents
With
Sheets(
"Umrechnung FP"
)
ZeileOut = 1
For
Zeile = 2
To
.Cells(Rows.Count,
"F"
).
End
(xlUp).Row
If
.Cells(Zeile,
"F"
).Value = Eingabedatum
Then
.Rows(Zeile).Copy destination:=Worksheets(
"FP(0)"
).Rows(ZeileOut)
ZeileOut = ZeileOut + 1
End
If
Next
Zeile
End
With
Sheets(
"FP(0)"
).Activate
Range(
"A1:Y250"
).Sort Key1:=Range(
"G1"
), Order1:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=
False
, Orientation:=xlTopToBottom
Else
Sheets(
"FP(0)ARR"
).UsedRange.ClearContents
With
Sheets(
"Umrechnung FP"
)
ZeileOut = 1
For
Zeile = 2
To
.Cells(Rows.Count,
"F"
).
End
(xlUp).Row
If
.Cells(Zeile,
"F"
).Value =
Date
Then
.Rows(Zeile).Copy destination:=Worksheets(
"FP(0)ARR"
).Rows(ZeileOut)
ZeileOut = ZeileOut + 1
End
If
Next
Zeile
End
With
Sheets(
"FP(0)ARR"
).Activate
Call
DELSORT
Range(
"A1:Y250"
).Sort Key1:=Range(
"A1"
), Order1:=xlAscending, Key2:=Range(
"G1"
), Order2:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=
False
, Orientation:=xlTopToBottom
End
If
Call
SheetsAusblenden
With
Application
.ScreenUpdating =
True
.EnableEvents =
True
.Calculation = xlCalculationAutomatic
End
With
End
Sub
2.Userform