stirlingmw
Board Regular
- Joined
- Feb 18, 2013
- Messages
- 75
When my Userform loads a Combobox is populated using the following code:
What code do I need to sort the results alphabetically. The data returned is a list of Projects, and therefore I only need to sort by first letter.
Thanks
Steve
Code:
Private Sub comboboxFill()
CmbFindProject.Clear
totRows = Worksheets("Project Master").Range("A1").CurrentRegion.Rows.count
For i = 2 To totRows
CmbFindProject.AddItem Worksheets("Project Master").Cells(i, 1).value
Next i
End Sub
What code do I need to sort the results alphabetically. The data returned is a list of Projects, and therefore I only need to sort by first letter.
Thanks
Steve