combobox question

  • Thread starter Thread starter Gary Keramidas
  • Start date Start date
G

Gary Keramidas

is it possible to set the list fill range using a range name? or even just a
range?

this doesn't seem to work either,
Me.ComboBox1.ListFillRange = Worksheets("db").Range("b3:ad15")

i wanted to use something like this:
Me.ComboBox1.ListFillRange = rngLU
 
Try passing a string.

Me.ComboBox1.ListFillRange _
= Worksheets("db").Range("b3:ad15").address(external:=true)

Or maybe to save some typing:

Dim myRng As Range

With Worksheets("DB")
Set myRng = .Range("b3:ad15")
End With

With Me.ComboBox1
.ColumnCount = myRng.Columns.Count
.ListFillRange = myRng.Address(external:=True)
End With
 
used the first example for now, may try the 2nd if the range is going to expand.
thanks dave
 

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

Back
Top