Filling a ComoboBox with Values on a different Worksheet

  • Thread starter Thread starter Dave Baranas
  • Start date Start date
D

Dave Baranas

I am trying to populate a combobox's listfillrange with cells on a
different sheet

e.g.

ComboBox1.ListFillRange = Worksheets ("SheetXYZ").Range("AB100:AB200")

this gives me Run-Time error '1004"

Application-Defined or Object-Defined Error

I Tried to use some examples from this NewsGroup but they still give
back errors

--------------------------------------------------------------------------------------------------------

ComboBox1.List = Worksheets("Sheet1").Range("A1:A10").Value

or

ComboBox1.RowSource = "Sheet1!A1:A10"

or

Dim cell As Range
For Each cell In Worksheets("Sheet1").Range("A1:A10")
ComboBox1.AddItem cell.Value
Next cell

For more info on comboboxes/listboxes see
www.rubbershoe.com/listbox.htm


Is there a way to do this so I do not have to have cells on every
sheet to be the references for filling combobox's. I am trying to keep
my filesize from exploding as the amount of sheets is very large.

Thanks in Advance

Dave Barans
 
Dave,

I think you want RowSource and not ListFillRange
and you need to enter it as a string

ComboBox1.RowSource = "SheetXYZ!AB100:AB200"

steve
 
Back
Top