Hi,
I have a combobox, which loads items from some code, so as to work like an autofilter. However the code loads items that appear more than once.
The code is below. Working with Excel 2000. How do I remove the duplicate items from the list?
The combobox is called filter_shipment
[VBA]
Dim usedshipment as string
Dim totalshipments as string
Dim cell as range
On Error Resume Next
usedshipment = "$C$3:" & ActiveSheet.Range("C65536").End(xlUp).Address
totalshipments = Range(usedshipment).Count 'counts the shipments on the transport
With filter_shipment
.Clear
For Each cell In Range(usedshipment).SpecialCells(xlCellTypeVisible)
.AddItem cell.Value
Next cell
End With
[/VBA]
Thanks for helping.