Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Excel VBA Dictionary型をソートして取り出す
Set Dic = CreateObject("Scripting.Dictionary")
With CreateObject("System.Collections.ArrayList")
For Each s In Dic.Keys
.Add s
Next
.Sort
For Each s In .ToArray
Debug.Print Dic.Item(s)
Next
End With
Set Dic = Nothing
@ddxb-jp

This comment has been minimized.

Copy link
Owner Author

@ddxb-jp ddxb-jp commented Dec 6, 2017

Dictionary型をソートして取り出すため、Collections.ArrayListにてソートキーを作って並べ直して取り出す。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment