zimGirl
Geotechnical
- Jul 22, 2004
- 30
i know how to remove duplicates from consecutive list in a combobox.
rent
rent
rent
count
count
How do you remove duplicates that are not consecutive?
rent
count
rent
rent
count
count
the above code only removes the two consecutive values
leaving
rent
count
rent
count
I want it to leave
rent
count
rent
rent
rent
count
count
Code:
Dim varI As Integer
Dim strTemp As String
Do While varI <= cmbCategory.ListCount
If varI = cmbCategory.ListCount Then
Exit Sub
End If
If strTemp = cmbCategory.List(varI) Then
cmbCategory.RemoveItem (varI)
intK = intK + 1
Else
strTemp = cmbCategory.List(varI)
varI = varI + 1
End If
Loop
How do you remove duplicates that are not consecutive?
rent
count
rent
rent
count
count
the above code only removes the two consecutive values
leaving
rent
count
rent
count
I want it to leave
rent
count