Hi All
I have the following code which looks at a list and shows the unique values from another sheet within the combobox. Is there a way i can get the combobox to show these values in alphabetical order?
many thanks
Private Sub UserForm_Initialize()
Dim v, e
With Sheets("Service Ticket Detail").Range("J2:J5000")
v = .Value
End With
With CreateObject("scripting.dictionary")
.comparemode = 1
For Each e In v
If Not .exists(e) Then .Add e, Nothing
Next
If .Count Then Me.FaultCat.List = Application.Transpose(.keys)
End With
End Sub
I have the following code which looks at a list and shows the unique values from another sheet within the combobox. Is there a way i can get the combobox to show these values in alphabetical order?
many thanks
Private Sub UserForm_Initialize()
Dim v, e
With Sheets("Service Ticket Detail").Range("J2:J5000")
v = .Value
End With
With CreateObject("scripting.dictionary")
.comparemode = 1
For Each e In v
If Not .exists(e) Then .Add e, Nothing
Next
If .Count Then Me.FaultCat.List = Application.Transpose(.keys)
End With
End Sub