Private Sub [COLOR=#ff0000]CommandButton1[/COLOR]_Click()
Dim i As Integer, count As Integer, arr() As Variant
[COLOR=#006400][I]'create array of selected items[/I][/COLOR]
With [COLOR=#ff0000]ListBox1[/COLOR]
count = 0
For i = 0 To .ListCount - 1
If .Selected(i) = True Then
ReDim Preserve arr(count)
arr(count) = CStr(.List(i))
count = count + 1
End If
Next i
End With
[COLOR=#006400][I]'filter based on array[/I][/COLOR]
With Sheets("Sheet3")
.Range("A1").CurrentRegion.AutoFilter Field:=4, Criteria1:=arr, Operator:=xlFilterValues
Unload Me
.Activate
End With
End Sub