By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,117 Members | 1,714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,117 IT Pros & Developers. It's quick & easy.

how to remove all item from combo box

100+
P: 284
i am using this code in load event of the form to add item to
combo box

Expand|Select|Wrap|Line Numbers
  1.  combobox1.additem "aaa" 
  2. combobox1.additem "bbb"
  3.  
now i want when i click a buttton all the items in the combo box are removed

so what is the code to remove all the item in combbox
May 24 '08 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 487
You did not point what is your version.

In VB 2005:
Expand|Select|Wrap|Line Numbers
  1. comboBox1.Items.Clear()
In VB 6.0
Expand|Select|Wrap|Line Numbers
  1. 'Not sure. Just check like below.
  2. comboBox1.Clear
  3. comboBox1.Remove
May 24 '08 #2

debasisdas
Expert 5K+
P: 8,127
ComboBox1.Clear

will do that for you.
May 26 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.