Dynamic Range and Combo Box

S

Stephen Glynn

I've succeeded in creating a dynamic named range by following the
instructions at

http://www.contextures.com/xlNames01.html#Dynamic

I've half succeeded in using it to populate a combo box.

The combo box happily takes the values in the range when I first created
the combo box but it doesn't use any additional entries I make to the
named range. I know Excel's seeing the new entries because I'm testing
it with =SUM(MyRange). This alters as soon as I add anything to it.

Where am I going wrong?

Steve
 
D

Debra Dalgleish

You could use the combobox from the Forms toolbar, which updates
automatically. Or, add code to the combobox's GotFocus event, to update
the list:

'==================
Private Sub ComboBox1_GotFocus()
ComboBox1.ListFillRange = "MyRange"
End Sub
'=====================
 

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