Private
Sub
cmdEingabe_Click()
Dim
intErsteLeereZeile
As
Long
Dim
intLauf
As
Long
intErsteLeereZeile = ActiveSheet.Cells(Rows.Count, 1).
End
(xlUp).Row + 1
ActiveSheet.Cells(intErsteLeereZeile, 1).Value = ActiveSheet.Cells(Rows.Count, 1).
End
(xlUp).Row - 3
ActiveSheet.Cells(intErsteLeereZeile, 2).Value =
Me
.txtKlasse.Value
ActiveSheet.Cells(intErsteLeereZeile, 3).Value =
Me
.ComboGeschlecht.Value
ActiveSheet.Cells(intErsteLeereZeile, 4).Value =
Me
.txtName.Value
ActiveSheet.Cells(intErsteLeereZeile, 5).Value =
Me
.txtVorname.Value
ActiveSheet.Cells(intErsteLeereZeile, 6).Value =
Me
.txtSchriftlichePrüfung.Value
ActiveSheet.Cells(intErsteLeereZeile, 7).Value =
Me
.ComboSportart.Value
ActiveSheet.Cells(intErsteLeereZeile, 8).Value =
Me
.txtKomplexübungNote.Value
ActiveSheet.Cells(intErsteLeereZeile, 9).Value =
Me
.txtSpielüberprüfungNote.Value
If
IsNull(
Me
.txtKomplexübungNote.Value)
Then
ActiveSheet.Cells(intErsteLeereZeile, 10).Value = Application.Round((
CDbl
(
Me
.txtKomplexübungNote.Value) +
CDbl
(
Me
.txtSpielüberprüfungNote.Value)) / 2, 0)
End
If
ActiveSheet.Cells(intErsteLeereZeile, 11).Value =
Me
.comboLaufdisziplin.Value
ActiveSheet.Cells(intErsteLeereZeile, 12).Value =
Me
.txtLaufdisziplin.Value
ActiveSheet.Cells(intErsteLeereZeile, 13).Value =
Me
.comboSprungdisziplin.Value
ActiveSheet.Cells(intErsteLeereZeile, 14).Value =
Me
.txtSprungdisziplin.Value
ActiveSheet.Cells(intErsteLeereZeile, 15).Value =
Me
.comboWurfdisziplin.Value
ActiveSheet.Cells(intErsteLeereZeile, 16).Value =
Me
.txtWurfdisziplin.Value
If
Me
.ComboGeschlecht.Value =
"männlich"
And
Me
.comboLaufdisziplin.Value =
"100m"
Then
ActiveSheet.Cells(intErsteLeereZeile, 17).Value = Application.VLookup(
Me
.txtLaufdisziplin.Value, Sheets(
"Tabellen"
).Range(
"O10:S25"
), 5,
True
)
ElseIf
Me
.ComboGeschlecht.Value =
"männlich"
And
Me
.comboLaufdisziplin.Value =
"200m"
Then
ActiveSheet.Cells(intErsteLeereZeile, 17).Value = Application.VLookup(
Me
.txtLaufdisziplin.Value, Sheets(
"Tabellen"
).Range(
"O100:S115"
), 5,
True
)
ElseIf
Me
.ComboGeschlecht.Value =
"männlich"
And
Me
.comboLaufdisziplin.Value =
"400m"
Then
ActiveSheet.Cells(intErsteLeereZeile, 17).Value = Application.VLookup(
Me
.txtLaufdisziplin.Value, Sheets(
"Tabellen"
).Range(
"U10:Y25"
), 5,
True
)
ElseIf
Me
.ComboGeschlecht.Value =
"männlich"
And
Me
.comboLaufdisziplin.Value =
"5000m"
Then
ActiveSheet.Cells(intErsteLeereZeile, 17).Value = Application.VLookup(
Me
.txtLaufdisziplin.Value, Sheets(
"Tabellen"
).Range(
"O76:S91"
), 5,
True
)
ElseIf
Me
.ComboGeschlecht.Value =
"weiblich"
And
Me
.comboLaufdisziplin.Value =
"100m"
Then
ActiveSheet.Cells(intErsteLeereZeile, 17).Value = Application.VLookup(TimeValue(
Me
.txtLaufdisziplin.Value), Sheets(
"Tabellen"
).Range(
"B10:F25"
), 5,
True
)
ElseIf
Me
.ComboGeschlecht.Value =
"weiblich"
And
Me
.comboLaufdisziplin.Value =
"200m"
Then
ActiveSheet.Cells(intErsteLeereZeile, 17).Value = Application.VLookup(
Me
.txtLaufdisziplin.Value, Sheets(
"Tabellen"
).Range(
"B100:F115"
), 5,
True
)
ElseIf
Me
.ComboGeschlecht.Value =
"weiblich"
And
Me
.comboLaufdisziplin.Value =
"400m"
Then
ActiveSheet.Cells(intErsteLeereZeile, 17).Value = Application.VLookup(
Me
.txtLaufdisziplin.Value, Sheets(
"Tabellen"
).Range(
"H10:L25"
), 5,
True
)
ElseIf
Me
.ComboGeschlecht.Value =
"weiblich"
And
Me
.comboLaufdisziplin.Value =
"5000m"
Then
ActiveSheet.Cells(intErsteLeereZeile, 17).Value = Application.VLookup(
Me
.txtLaufdisziplin.Value, Sheets(
"Tabellen"
).Range(
"B76:F91"
), 5,
True
)
End
If
If
Me
.ComboGeschlecht.Value =
"männlich"
And
Me
.comboSprungdisziplin.Value =
"Hochsprung"
Then
ActiveSheet.Cells(intErsteLeereZeile, 18).Value = Application.VLookup(
CDbl
(
Me
.txtSprungdisziplin.Value), Sheets(
"Tabellen"
).Range(
"U32:Y47"
), 5,
True
)
ElseIf
Me
.ComboGeschlecht.Value =
"männlich"
And
Me
.comboSprungdisziplin.Value =
"Weitsprung"
Then
ActiveSheet.Cells(intErsteLeereZeile, 18).Value = Application.VLookup(
CDbl
(
Me
.txtSprungdisziplin.Value), Sheets(
"Tabellen"
).Range(
"O32:S47"
), 5,
True
)
ElseIf
Me
.ComboGeschlecht.Value =
"weiblich"
And
Me
.comboSprungdisziplin.Value =
"Hochsprung"
Then
ActiveSheet.Cells(intErsteLeereZeile, 18).Value = Application.VLookup(
CDbl
(
Me
.txtSprungdisziplin.Value), Sheets(
"Tabellen"
).Range(
"H32:L47"
), 5,
True
)
ElseIf
Me
.ComboGeschlecht.Value =
"weiblich"
And
Me
.comboSprungdisziplin.Value =
"Weitsprung"
Then
ActiveSheet.Cells(intErsteLeereZeile, 18).Value = Application.VLookup(
CDbl
(
Me
.txtSprungdisziplin.Value), Sheets(
"Tabellen"
).Range(
"B32:F47"
), 5,
True
)
End
If
If
Me
.ComboGeschlecht.Value =
"männlich"
And
Me
.comboWurfdisziplin.Value =
"Kugelstoßen"
Then
ActiveSheet.Cells(intErsteLeereZeile, 19).Value = Application.VLookup(
CDbl
(
Me
.txtWurfdisziplin.Value), Sheets(
"Tabellen"
).Range(
"O54:S69"
), 5,
True
)
ElseIf
Me
.ComboGeschlecht.Value =
"männlich"
And
Me
.comboWurfdisziplin.Value =
"Speerwurf"
Then
ActiveSheet.Cells(intErsteLeereZeile, 19).Value = Application.VLookup(
CDbl
(
Me
.txtWurfdisziplin.Value), Sheets(
"Tabellen"
).Range(
"U54:Y69"
), 5,
True
)
ElseIf
Me
.ComboGeschlecht.Value =
"weiblich"
And
Me
.comboWurfdisziplin.Value =
"Kugelstoßen"
Then
ActiveSheet.Cells(intErsteLeereZeile, 19).Value = Application.VLookup(
CDbl
(
Me
.txtWurfdisziplin.Value), Sheets(
"Tabellen"
).Range(
"B54:F69"
), 5,
True
)
ElseIf
Me
.ComboGeschlecht.Value =
"weiblich"
And
Me
.comboWurfdisziplin.Value =
"Speerwurf"
Then
ActiveSheet.Cells(intErsteLeereZeile, 19).Value = Application.VLookup(
CDbl
(
Me
.txtWurfdisziplin.Value), Sheets(
"Tabellen"
).Range(
"H54:L69"
), 5,
True
)
End
If
ActiveSheet.Cells(intErsteLeereZeile, 21).Value =
Me
.txtFSLPNote.Value
ActiveSheet.Cells(intErsteLeereZeile, 24).Value =
Me
.txtVorsitz.Value
ActiveSheet.Cells(intErsteLeereZeile, 25).Value =
Me
.txtSchrift.Value
ActiveSheet.Cells(intErsteLeereZeile, 26).Value =
Me
.txtFach.Value
ActiveSheet.Cells(intErsteLeereZeile, 27).Value =
Me
.txtSportspielDatum.Value
ActiveSheet.Cells(intErsteLeereZeile, 28).Value =
Me
.txtSportspielBeginn.Value
ActiveSheet.Cells(intErsteLeereZeile, 29).Value =
Me
.txtSportspielEnde.Value
ActiveSheet.Cells(intErsteLeereZeile, 30).Value =
Me
.txtLeichtatlethikDatum.Value
ActiveSheet.Cells(intErsteLeereZeile, 31).Value =
Me
.txtLeichtatlethikBeginn.Value
ActiveSheet.Cells(intErsteLeereZeile, 32).Value =
Me
.txtlLeichtatlethikEnde.Value
ActiveSheet.Cells(intErsteLeereZeile, 33).Value =
Me
.txtFSLPDatum.Value
ActiveSheet.Cells(intErsteLeereZeile, 34).Value =
Me
.txtFSLPBeginn.Value
ActiveSheet.Cells(intErsteLeereZeile, 35).Value =
Me
.txtFSLPEnde.Value
Range(
"A5:AI244"
).
Select
ActiveWorkbook.Worksheets(
"Ergebnisse"
).Sort.SortFields.Clear
ActiveWorkbook.Worksheets(
"Ergebnisse"
).Sort.SortFields.Add Key:=Range( _
"B6:B244"
), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets(
"Ergebnisse"
).Sort.SortFields.Add Key:=Range( _
"D6:D244"
), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With
ActiveWorkbook.Worksheets(
"Ergebnisse"
).Sort
.SetRange Range(
"A5:AI244"
)
.Header = xlYes
.MatchCase =
False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End
With
End
Sub