this is the code for the listbox
---------------------------------------------------------------------
Dim i As Long
Dim j As Long
With List1
For i = 0 To .ListCount - 1
For j = .ListCount To (i + 1) Step -1
If .List(j) = .List(i) Then
.RemoveItem j
End If
Next
Next
End With

End Sub


---------------------------------------------------------------------
this is the best i can alter the code
---------------------------------------------------------------------

Dim i As Long
Dim j As Long
With cboIUpREF
For i = 0 To .Items.Count - 1
For j = .Items.Count To (i + 1) Step -1
If .Items.Item(j) = .Items.Item(i) Then
.Items.Remove(j)
End If
Next
Next
End With


the line "If .Items.Item(j) = .Items.Item(i) Then" causes an error, what could i change it to, or is there another way other removing dups from a combo box, im using vb.net.