标签: excel vba excel-vba dictionary
当我尝试在VBA中创建字典时出现错误Run-time error '424': Object required。我的代码如下所示:
Run-time error '424': Object required
Private Sub data() Dim dicti As Object Set dicti = CreateObject(Scripting.Dictionary)
如何解决此问题?
答案 0 :(得分:3)
尝试
dim dicti As Object Set dicti = CreateObject("Scripting.Dictionary")
或者,通过访问VBE的工具,参考并包括选中的Microsoft脚本运行时,将较晚的绑定交换为较早的绑定。
dim dicti as new Scripting.Dictionary