迭代字典中的所有專案
set oDic = CreateObject("Scripting.Dictionary")
oDic.add "USA", "United States of America"
oDic.add "UK", "United Kingdom"
oDic.add "CAN", "Canada"
For Each obj in oDic.Items
Msgbox obj
Next
Set oDic = Nothing
* 輸出:
美國
英國
加拿大
set oDic = CreateObject("Scripting.Dictionary")
oDic.add "USA", "United States of America"
oDic.add "UK", "United Kingdom"
oDic.add "CAN", "Canada"
For Each obj in oDic.Items
Msgbox obj
Next
Set oDic = Nothing
* 輸出:
美國
英國
加拿大