worksheet.combobox.clear method not workable ?

  • Thread starter Thread starter Marek
  • Start date Start date
M

Marek

people,
i cant understand why in help is writed that combobox support clea
method,

but when i in macro write this

worksheets(1).drawingobjects("combo1").clear

then i get error like "this ibject dont supp this prop or method"


how it can be, that combobox method clear which is described in hel
dont want to work ????




thank
 
Control toolbox toolbar Comboboxes have a clear method. DropDowns from the
forms toolbar do not. They have removeallitems. This assumes that the box
was populated with AddItem (rather than linked to a range - data bound)

Sub SetBox()
For i = 1 To 10
Worksheets(1).DropDowns("combo1").AddItem "item" & i
Next
End Sub

Sub ClearBox()
Worksheets(1).DropDowns("combo1").RemoveAllItems
End Sub
 

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

Back
Top