I got stuck into this problem wherein i have to filter data into combo box. The list should only have unique records. here's the code for populating records into combo box:
Private Sub UserForm_Activate()
Dim myrng As Range
Dim cl As Range
Dim sh As Worksheet
Set sh = Worksheets("Product_Master")
Set myrng = sh.Range("C2:C100000")
With Me.comBox_Purchase_Product
.Clear
For Each cl In myrng.Cells
If cl.Value <> "" Then
.AddItem cl.Value
End If
Next cl
End With
End sub
Heres the Products I am getting...now i want only unique records and to remove all duplicate.
Thanks in Advance.