How do I set the rowsource for a ComboBox for a dynamic list?

N

ndm berry

I have a ComboBox on a UserForm that relates to a list which is updated every
time the workbook is opened. At the moment, so that I can carry on with
other aspects, I have set the rowSource as follows:-

ComboBox1.RowSource = "A1:B456"

This of course is only temporary and I would appreciate a more permanent
solution.

Many thanks in advance.
 
T

Tom Ogilvy

Just guessing

With Worksheets("Sheet3")
set rng = .Range(.range("A1"),.Range("A1").end(xldown))
End with
rng.Resize(,2)
Combobox1.ColumnCount = 2
Combobox1.RowSource = rng.Address(external:=True)
 

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