Private
Sub
ComboBox1_Change()
ActiveSheet.ListObjects(
"Tabelle2"
).Range.AutoFilter Field:=14, Criteria1:=UserForm1.ComboBox1
UserForm1.ComboBox2.Enabled =
True
Call
Cbo_Spalte13
End
Sub
Private
Sub
ComboBox2_Change()
Criteria1 = UserForm1.ComboBox2 &
"*"
ActiveSheet.ListObjects(
"Tabelle2"
).Range.AutoFilter Field:=13, Criteria1:=UserForm1.ComboBox2
UserForm1.ComboBox3.Enabled =
True
Call
Cbo_Spalte11
End
Sub
Private
Sub
ComboBox3_Change()
Criteria1 = UserForm1.ComboBox3 &
"*"
ActiveSheet.ListObjects(
"Tabelle2"
).Range.AutoFilter Field:=12, Criteria1:=UserForm1.ComboBox3
End
Sub
Private
Sub
Cbo_Spalte14()
Dim
oDic14
As
Object
, meAr14
Dim
A
As
Long
Set
oDic14 = CreateObject(
"Scripting.Dictionary"
)
With
Sheets(
"Tabelle1"
)
meAr14 = .Range(
"N7"
, .Cells(.Rows.Count,
"N"
).
End
(xlUp)).SpecialCells(xlCellTypeVisible)
End
With
For
A = 1
To
UBound(meAr14)
oDic14(meAr14(A, 1)) = 0
Next
ComboBox1.List = oDic14.keys
End
Sub
Private
Sub
Cbo_Spalte13()
Dim
ws
As
Worksheet
Dim
iZeile
As
Long
Set
ws = Sheets(
"Tabelle1"
)
For
iZeile = 7
To
ws.Cells(Rows.Count,
"M"
).
End
(xlUp).Row
If
WorksheetFunction.CountIf(ws.Range(
"M7:M"
& iZeile), ws.Cells(iZeile,
"M"
)) = 1
And
_
ws.Rows(iZeile).Hidden =
False
Then
_
ComboBox2.AddItem ws.Cells(iZeile,
"M"
)
Next
iZeile
End
Sub
Private
Sub
Cbo_Spalte11()
Dim
ws
As
Worksheet
Dim
iZeile
As
Long
Set
ws = Sheets(
"Tabelle1"
)
For
iZeile = 7
To
ws.Cells(Rows.Count,
"L"
).
End
(xlUp).Row
If
WorksheetFunction.CountIf(ws.Range(
"L7:L"
& iZeile), ws.Cells(iZeile,
"L"
)) = 1
And
_
ws.Rows(iZeile).Hidden =
False
Then
_
ComboBox3.AddItem ws.Cells(iZeile,
"L"
)
Next
iZeile
End
Sub