--
Dim ss As String = "语文,英语" \'可以改为CheckedComboBox的值
Dim filter As String
Dim sr() As String = ss.split(",")
Dim aa() As String = {"语文","数学","英语"}
Dim s1 As String
If sr.Length = 2 Then
s1 = ",\'" & sr(0) & "和" & sr(1) & "\',\'" & sr(1) & "和" & sr(0) & "\'"
End If
For Each s3 As String In sr
For Each s2 As String In aa
If s2 <> s3 Then
s1 = s1 & ",\'" & s3 & "或" & s2 & "\',\'" & s2 & "或" & s3 & "\'"
End If
Next
Next
filter = "三大科优势 in (\'全部\',\'" & sr(0) & "\',\'" & sr(1) & "\'" & s1 & ")"
msgbox(filter)