當前位置:成語大全網 - 新華字典 - 定義字典數組(VBA)

定義字典數組(VBA)

Dim dict(1) As Object

Set dict(0) = CreateObject("Scripting.Dictionary")

Set dict(1) = CreateObject("Scripting.Dictionary")

dict(0).Add "test", "www.baidu.com"

dict(1).Add "test2", "vb"

MsgBox dict(0)("test") & vbCrLf & dict(1)("test2")