Real quick: AddItem with combo boxes?

A

AVERAGE(user)

I'm brand new to VBA, literally picked up on it a couple minutes ago,
it's great so far, but I've ran into confusement.

I have a combo box on the spreadsheet, how do I add items to it? (not
by cell values I mean), this is what I tried:


Code:
 
B

Bob Phillips

I guess that this is a forms combo.

Private Sub Worksheet_Activate()
Activesheet.Dropdowns("dropHomeTeam").AddItem = "Minnesota Vikings"
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"AVERAGE (user)" <[email protected]>
wrote in message
news:[email protected]...
 
G

Guest

combo box from control toolbar ???Forms is the one with input range and cell
link for control
--
paul
remove nospam for email addy!



Bob Phillips said:
I guess that this is a forms combo.

Private Sub Worksheet_Activate()
Activesheet.Dropdowns("dropHomeTeam").AddItem = "Minnesota Vikings"
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"AVERAGE (user)" <[email protected]>
wrote in message
 
B

Bob Phillips

Then your code should work. Did you put the code in the worksheet code
module?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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