Remove Duplicate Values
I am loading a Combobox with the below cade, but i want to REMOVE any Values from the LIst IF they
are a Duplicate.
How can i add this in to the below code ?
Private Sub ComboBox5_DropButtonClick()
Application.ScreenUpdating = False
If ComboBox5.ListCount 0 Then Exit Sub
Dim LastCell As Long
Dim myrow As Long
On Error Resume Next
LastCell = Worksheets("Contact List").Cells(Rows.Count, "B").End(xlUp).Row
With ActiveWorkbook.Worksheets("Contact List")
..Select
For myrow = 2 To LastCell
If .Cells(myrow, 2) < "" Then
If Cells(myrow, 2).Value < "" Then
ComboBox5.AddItem Cells(myrow, 2)
End If
End If
Next
End With
End Sub
Corey....
|