How to clear the contents of COmboBox?

G

Guest

Hi
I have combobox to which I add options on first itireation by Additem property. On next iteration, the old values shoudl be cleared but I cannot use Clear method, its giving error.
I later found that Clear method fails for comboboxes created at design time. Now on second iteration , although new values are added but values form previous additon remain( which are totally irrelevant in new context)
How do I clear the previous options of dropdownlist associated with the combobox
TI
Shilps
 
G

Guest

Thanks Brian, but I have already stated that I am not able to stand Clear method as it is giving error. And the Combobox is on the worksheet , not on a form
 
B

BrianB

I think you may need to copy/paste your setup code so we can see whic
control you are using.

Perhaps this is what you want, although it is a DropDown :-

Set MyDropDown = ActiveSheet.Shapes("Drop Down1")
MyDropDown.ControlFormat.RemoveAllItem
 
G

Guest

Brian I am adding the ComboBox from the control ToolBox and I think we cannot use the Shapes/Control Format property for that.
 

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