从组合框中删除所有项目? [英] Removing All Items From A ComboBox?
本文介绍了从组合框中删除所有项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
您需要单独删除每个项目:
对于i = 1到ListBox1.ListCount
'使用ListBox1从ListBox中删除一个项目。 RemoveItem
下一页i
更新 - 我不知道为什么我的回答不包括完整解决方案:
For i = ListBox1.ListCount - 1 to 0 Step - 1
ListBox1.RemoveItem i
Next i
How can I programmatically remove all items from a combobox in VBA?
解决方案
You need to remove each one individually unfortunately:
For i = 1 To ListBox1.ListCount
'Remove an item from the ListBox using ListBox1.RemoveItem
Next i
Update - I don't know why my answer did not include the full solution:
For i = ListBox1.ListCount - 1 to 0 Step - 1
ListBox1.RemoveItem i
Next i
这篇关于从组合框中删除所有项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文