Private Sub CommandButton1_Click() '篩選條件
Dim A, B, C, D, E, F
A = ComboBox4.Value
B = ComboBox1.Value
C = ComboBox2.Value
D = ComboBox3.Value
E = ComboBox5.Value
F = ComboBox7.Value
With ActiveSheet.Range("$A$1:$Q$300")
.Parent.AutoFilterMode =
If A <> "" Then .AutoFilter Field:=1, Criteria1:=A
If B <> "" Then .AutoFilter Field:=2, Criteria1:=B
If C <> "" Then .AutoFilter Field:=3, Criteria1:=C
If D <> "" Then .AutoFilter Field:=4, Criteria1:=D
If E <> "" Then .AutoFilter Field:=14, Criteria1:=E
If F <> "" Then .AutoFilter Field:=17, Criteria1:=F
End With
End Sub
Private Sub CommandButton4_Click()
With ActiveSheet.Range("$A$1:$Q$300")
.Parent.AutoFilterMode =
End With
End Sub
Private Sub UserForm_Initialize()
Dim m As Object, A
Dim n As Object, B
Dim o As Object, C
Dim p As Object, D
Dim q As Object, E
Dim r As Object, F
Set m = CreateObject("Scripting.Dictionary")
Set n = CreateObject("Scripting.Dictionary")
Set o = CreateObject("Scripting.Dictionary")
Set p = CreateObject("Scripting.Dictionary")
Set q = CreateObject("Scripting.Dictionary")
Set r = CreateObject("Scripting.Dictionary")
With Sheet1
For Each A In .Range("B3", .[B3].End(xlDown))
m(A.Value) = ""
Next
For Each B In .Range("C3", .[C3].End(xlDown))
n(B.Value) = ""
Next
For Each C In .Range("D3", .[D3].End(xlDown))
o(C.Value) = ""
Next
For Each D In .Range("A3", .[A3].End(xlDown))
p(D.Value) = ""
Next
For Each E In .Range("N3", .[N3].End(xlDown))
q(E.Value) = ""
Next
For Each F In .Range("Q3", .[Q3].End(xlDown))
r(F.Value) = ""
Next