Hello everyone,
I'm new in VBA code and I've got a big problem
There's a workbook with a sheet called "Database".
I need to create a multi-selection listbox, in order to filter a particular column of the Database sheet.
Any ideas??
I created a very simple listbox, but I can't filter more than just 1 selection.
Is the code similar to this one?
[vba]Private Sub ListBox1_Change()
Dim x As Variant, i As Variant, j As Variant
Dim arr()
x = ListBox1.ListCount - 1
ReDim arr(x)
For i = 0 To x
If ListBox1.Selected(i) = True Then
arr(j) = ListBox1.List(i)
j = j + 1
End If
Next i
ReDim Preserve arr(j - 1)
On Error Resume Next
For i = x + 1 To 1 Step -1
SOMETHING.....
Next
End Sub[/vba]
Thank you for your patience...