I\'m not that familiar with VB or VBA, though I am familiar with programming.
I\'m working with Excel 2016 and trying to populate a combobox (that lives on a user form)
I'd like to use a data structure that offers a sort function, if one exists.
Yes exists, for example SortedList from .Net framework can be used.
SortedList
represents a collection of key/value pairs that are sorted by the keys and are accessible by key and by index.
VBA code example:
Add reference to C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.tlb
Sub SortedListDemo()
Dim sr As mscorlib.SortedList
Set sr = New mscorlib.SortedList
sr.Add "D", "D"
sr.Add "B", "B"
sr.Add "A", "A"
sr.Add "C", "C"
Dim i As Integer
For i = 0 To sr.Count - 1
Debug.Print "Key: " & sr.GetKey(i) & ", Value: " & sr.GetByIndex(i)
Next i
Set sr = Nothing
End Sub
Output
Key: A, Value: A
Key: B, Value: B
Key: C, Value: C
Key: D, Value: D
Some more information e.g. here. HTH