添加库引用
Microsoft Scripting Runtime
定义变量
dim dic as Dictionary
set dic = CreateObject(“scripting.dictionary”)
函数如何返回字典?
Sub mySub()
dim myDict as Dictionary
set myDict = myFunc()
End Sub
Function myFunc() as Dictionary
dim myDict2 as Dictionary
set myDict2 = new Dictionary
‘some code that does things and adds to myDict2’
set myFunc=myDict2
End Function
Vba字典需要引入什么库
最新推荐文章于 2023-03-30 14:30:34 发布