【发布时间】:2013-05-26 10:00:38
【问题描述】:
我在 Visual Basic for Applications 中遇到了 Collection 对象的问题(我在 Excel 中使用它)
我有这段代码试图清空我必须重复使用的 Collection 对象:
Sub limpieza(ByRef listilla As Collection)
While listilla.Count <> 0
listilla.Remove (listilla.Count)
Wend
End Sub
但是当我调用它时:
Dim listado As New Collection
<I have some code here that add some values to the collection>
limpieza (listado)
VBA 对我说
参数不是可选的
代码没有运行。
我能做什么?我需要在重用 Collection 对象的循环底部使用此集合清理。
【问题讨论】:
标签: vba list collections arguments