In Excel VBA, how can you sort a dictionary by a field of the Item (similar to C# orderby)?
21:40 25 Mar 2021

I have a dictionary in Excel VBA where the key is a string (SS #), and the value is an object that has three properties (Name, Birthdate and Job Name):

Dim d as Dictionary
Set d = new Dictionary

d.Add "123", obj
d.Add "234", obj2
d.Add "342", obj3

I want to print out a table by in order of Birthdate. In C#, I would do something like this

for each (var item in dict.Items.Orderby(r=>r.Birthdate))

but I can't figure out in VBA how I can sort this dictionary by the Birthdate of the item in that dictionary.

Is this possible in Excel VBA?

excel vba sorting dictionary