我有一个名为Holding的类模块,其中有几个公共变量。我的代码如下:
Dim holdings as Collection
Dim h as Holding
Set holdings = new Collection
For i = 1 to last
Set h = new Holding
h.x = y
'... etc
holdings.Add(h)
Next i
在holdings.Add(h)
这一行出现"对象不支持此属性或方法"的错误,但无论我看到哪里,都给出了如何实现此操作的确切示例。我错过了什么?