Add item to comboBox "form" from vba

0

0000_AAAA_0000

Hi!

how can I add 2 items say "QAZ" and "WSX" to a ComboBox inserted in th
activesheet using the forms toollbar


from VBA


Sub help()
with activesheet.combobox1
.additem "QAZ"
.additem "WSX"
end with
'this work when the combobox comes from the activecontrols toolbars bu
when 'from the other toolbar?
ens sub


many thanks
 
T

Tom Ogilvy

Sub help()
with activesheet.DropDowns(1)
.additem "QAZ"
.additem "WSX"
end with
end sub

Replace the 1 with the name of the dropdown (found in the name box when the
control is selected) if you wish.
 

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