I'm currently trying to create a filter/sorting UI. I'm unfortunately quite limited when it comes to preventing duplicates before filling the Listbox. Hence the question is if there is a way to remove them afterward.
I'll include my attempt at fixing my issue.
Kind regards and thanks for the help.
With Sheets("Tabelle1")
lngZeileMax = .Cells(.Rows.Count, 11).End(xlUp).Row
Set rngBereich = .Range(.Cells(2, 11), .Cells(lngZeileMax, 11))
End With
Me.Caption = "Anlagekategorie"
With Me.ListBox1
.List = rngBereich.Value
.MultiSelect = fmMultiSelectMulti
End With
**Dim k As Long
Dim j As Long
With ListBox1
For k = 0 To .ListCount - 1
For j = .ListCount - 1 To (k + 1) Step -1
If .List(k) = .List(j) Then .RemoveItem
End If
Next j
Next l
End With**
End Sub