I have the following Variant:
Dim comboitems() As Variant
that I use in all the code as an array that contains the values of a ComboBox
control.
In a certain point of the code, I need to clear/empty/null comboitems()
. How can I do? I tried all of the following options without any success.
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
The error that I get is this:
Erase comboitems
perhaps? – KnawelReDim
withoutpreserve
? – Staple