Option
Explicit
Private
Sub
cmbLiga_AfterUpdate()
With
ThisWorkbook.Sheets(
"bundesliga_Spieler"
)
Dim
lngRow
As
Long
lngRow = 2
cmbVerein.Clear
Do
While
.Cells(lngRow, 13) <>
""
If
.Cells(lngRow, 14) =
CLng
(cmbLiga)
Then
Call
AddSortedToBox(cmbVerein, .Cells(lngRow, 13))
lngRow = lngRow + 1
Loop
End
With
End
Sub
Private
Sub
cmdsuchen_Click()
With
ThisWorkbook.Sheets(
"bundesliga_Spieler"
)
Dim
strSpielername
As
String
Dim
lngSpielerBuchstabe
As
Long
Dim
booTreffer
As
Boolean
Dim
lngSuchBuchstabe
As
Long
Dim
lngRow
As
Long
lngRow = 2
Do
While
.Cells(lngRow, 4) <>
""
strSpielername = .Cells(lngRow, 4)
For
lngSuchBuchstabe = 1
To
Len(txtsuche)
booTreffer =
False
For
lngSpielerBuchstabe = 1
To
Len(strSpielername)
If
Mid(strSpielername, lngSpielerBuchstabe, 1) = Mid(txtsuche, lngSuchBuchstabe, 1)
Then
booTreffer =
True
Next
lngSpielerBuchstabe
If
booTreffer =
False
Then
Exit
For
Next
lngSuchBuchstabe
If
booTreffer =
True
Then
If
.Cells(lngRow, 5) = cmbLand
And
_
.Cells(lngRow, 14) = cmbLiga
And
_
.Cells(lngRow, 13) = cmbVerein
Then
Call
AddSortedToBox(lbergebnis, strSpielername)
End
If
End
If
lngRow = lngRow + 1
Loop
End
With
End
Sub
Private
Sub
UserForm_Activate()
Dim
lngRow
As
Long
Dim
strSpielername
As
String
cmbLand.Clear
With
ThisWorkbook.Sheets(
"Bundesliga_Spieler"
)
lngRow = 2
Do
While
.Cells(lngRow, 5) <>
""
Call
AddSortedToBox(cmbLand, .Cells(lngRow, 5))
lngRow = lngRow + 1
Loop
End
With
cmbVerein.Clear
With
ThisWorkbook.Sheets(
"bundesliga_Spieler"
)
lngRow = 2
Do
While
.Cells(lngRow, 13) <>
""
Call
AddSortedToBox(cmbVerein, .Cells(lngRow, 13))
lngRow = lngRow + 1
Loop
End
With
cmbLiga.Clear
With
ThisWorkbook.Sheets(
"bundesliga_Spieler"
)
lngRow = 2
Do
While
.Cells(lngRow, 14) <>
""
Call
AddSortedToBox(cmbLiga, .Cells(lngRow, 14))
lngRow = lngRow + 1
Loop
End
With
With
ThisWorkbook.Sheets(
"bundesliga_Spieler"
)
lngRow = 2
Do
While
.Cells(lngRow, 3) <>
""
If
cbt09 =
True
And
_
.Cells(lngRow, 3) > 0
And
_
.Cells(lngRow, 3) < 10
Or
cbt1019
And
_
.Cells(lngRow, 3) > 9
And
_
.Cells(lngRow, 3) < 20
Or
cbt2029
And
_
.Cells(lngRow, 3) > 19
And
_
.Cells(lngRow, 3) < 30
Or
cbt3039
And
_
.Cells(lngRow, 3) > 29
And
_
.Cells(lngRow, 3) < 40
Or
cbt4049
And
_
.Cells(lngRow, 3) > 39
And
_
.Cells(lngRow, 3) < 50
Or
cbt49
And
_
.Cells(lngRow, 3) > 49
Then
Call
AddSortedToBox(lbergebnis, strSpielername)
End
If
lngRow = lngRow + 1
Loop
End
With
End
Sub