Combo Box?

H

hce

Hi All

Can someone KINDLY REFRESH MY oOLD BRAIN COS my memory is failing me..
Can someone kindly help to teach me how i can put the items into a comb
box on the userform...?

cheer
 
J

JulieD

Hi

normally against the form initialize event

combobox1.additem "item1"
combobox1.additem "item2"

or if coming from a range

Dim rng As Range

set rng = Range("A1:A10")

for each cell in rng
combobox1.additem cell.value
next

Cheers
JulieD
 
B

Bob Phillips

or link it to a worksheet range

ComboBox1.RowSource = "A1:A10"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

JulieD said:
Hi

normally against the form initialize event

combobox1.additem "item1"
combobox1.additem "item2"

or if coming from a range

Dim rng As Range

set rng = Range("A1:A10")

for each cell in rng
combobox1.additem cell.value
next

Cheers
JulieD
 
J

JulieD

i always forget that one :)

Bob Phillips said:
or link it to a worksheet range

ComboBox1.RowSource = "A1:A10"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top