RemoveItem - ComboBox

M

Mike

Hi!

I am trying to remove items from combo box (with 8 items), so I wrote this
macro:

For i = 0 To 8
Sheet1.ComboBox1.RemoveItem i
Next

and it breaeks down at 4!
actually, it always removes only half of the items in combo box
I tried it with 20, 100 .... and it doesn't matter!

Does anybody have an idea how to make work it

Thanks!!!
 
T

Tom Ogilvy

For i = 8 To 0 step - 1
Sheet1.ComboBox1.RemoveItem 1
Next

0 to 8 is 9 items. If there are actually only 8, then start at 7.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top