2017-12-22 123 views
5

Aşağıdaki Varyant sahiptir.VBA: Nasıl bir varyant null? Bir <code>ComboBox</code> kontrol değerlerini içeren bir dizi olarak kodu kullanmak</p> <pre><code>Dim comboitems() As Variant </code></pre> <p>:

Kodun belirli bir noktasında, comboitems() kodunu temizlemem/boşaltmam/sıfırlamam gerekir. Nasıl yapabilirim? Aşağıdaki seçeneklerin hiçbirini başarıya ulaşmadan denedim.

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 

alıyorum hata şudur: varyant diziler için

enter image description here

+2

'belki comboitems' silinsin mi? Koru olmadan –

+1

'ReDim'? – LocEngineer

cevap

İlgili konular