Private
Sub
ButtonInsert_Click()
Dim
last
As
Integer
last = ActiveSheet.Cells(Rows.Count, 1).
End
(xlUp).Row + 1
ActiveSheet.Cells(last, 1).Value = Eingabe.TextDatum.Value
ActiveSheet.Cells(last, 13).Value = Eingabe.TextStart.Value
ActiveSheet.Cells(last, 14).Value = Eingabe.TextEnde.Value
If
Eingabe.TextKilometer.Value < 41 _
And
Eingabe.OptionButton1-1.Value =
True
_
And
Eingabe.OptionButton2-2.Value =
False
_
And
Eingabe.OptionButton2-3.Value =
False
_
Then
ActiveSheet.Cells(last, 2).Value = Eingabe.TextKilometer.Value
If
Eingabe.TextKilometer.Value > 40 _
And
Eingabe.OptionButton1-1.Value =
True
_
And
Eingabe.OptionButton2-2.Value =
False
_
And
Eingabe.OptionButton2-3.Value =
False
_
Then
ActiveSheet.Cells(last, 3).Value = Eingabe.TextKilometer.Value
If
Eingabe.TextKilometer.Value > 40 _
And
Eingabe.OptionButton1-1.Value =
True
_
And
Eingabe.OptionButton2-2.Value =
False
_
And
Eingabe.OptionButton2-3.Value =
False
_
Then
ActiveSheet.Cells(last, 3).Value = Eingabe.TextKilometer.Value
(usw.)
Range(Cells(2, 1), Cells(185, 18)).Sort Key1:=Cells(2, 1), Order1:=xlAscending, _
Key2:=Cells(2, 13), Order2:=xlAscending, Orientation:=xlTopToBottom
Worksheets(
"Hauptmenü"
).Activate
Unload Eingabe
End
Sub