【发布时间】:2017-12-22 09:59:25
【问题描述】:
我有以下变体:
Dim comboitems() As Variant
我在所有代码中将其用作包含ComboBox 控件值的数组。
在代码的某一点,我需要清除/清空/空comboitems()。我能怎么做?我尝试了以下所有选项,但均未成功。
comboitems = ""
comboitems = Null
comboitems = Nothing
Set comboitems = ""
Set comboitems = Null
Set comboitems = Nothing
comboitems() = ""
comboitems() = Null
comboitems() = Nothing
Set comboitems() = ""
Set comboitems() = Null
Set comboitems() = Nothing
我得到的错误是这样的:
【问题讨论】:
-
Erase comboitems也许? -
ReDim没有preserve?