Excel VBA Dictionary型をソートして取り出す
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dictionary型をソートして取り出すため、Collections.ArrayListにてソートキーを作って並べ直して取り出す。