Select the combo box right click and select properties then select row source and enter your range name in there. The output of the combo box goes in control source.
Also have an experiment with additem type it in, select it and press F1 for more info. I find this a better way but is more complicated.
Thanks and heres what I ended up with
Malc
Thanks very much. I was oh so close!!!
Here's what I ended up with. Does excel 97 have the row source? I couldn't find it - but you helped me figure out what I needed. Thanks
Sub test()
Set RangeNameList = Range("RangeNameList").Cells
Worksheets(1).Select
With Worksheets(1)
Set MyDropDown = .Shapes.AddFormControl(xlDropDown, 10, 10, 100, 15)
For Each cell In RangeNameList
MyDropDown.ControlFormat.AddItem cell.Value
Next cell
End With
End Sub
Re: Thanks and heres what I ended up with
Well done. Excel 97 does have a rowsource property in the properties box it's hard to find though. Try selecting by alphabetical rather than category. Anyway your code works. You should add MyDropDown.Rowsource ="" before For Each... as that will clear out any items before loading the new ones otherwise it'll keep appending to anything that already in there.
Bonjour Brian P for De Palma?,
I want to know how to code to create a combobox, is it on a sheet or a userform?
2001 regards