sorting/no duplicate scripting dictionary in Excel VBA
How to sort the Combobox values from the scripting dicionary?
The following code works well when posting values in the combobox and
eliminating the dups:
Dim rSource As Range, cell As Range
Dim sVal As String
'Set rng = curWks.AutoFilter.Range
Set rSource = Worksheets("Master Interview Schedule").Range("A:A")
With ComboBox1
For Each cell In rSource.Cells
sVal = cell.Value
If Not dic.Exists(sVal) Then
dic.Add sVal, sVal
.AddItem sVal
End If
Next
End With
Set dic = Nothing
Is there a way to sort the values at the same time?
|