Combo Box question regarding range

L

Luke Rushing

I have a form with a combo box within Excel 97. I want to
propagate the combo box with data from a worksheet in the
same workbook. In this worksheet there are ranges
defined. I want to be able to reference a range name that
contains the data necessary for the combo box. How do I
do this with VBA?

Thank you!

Luke Rushing
 
K

Kevin Beckham

Luke,

Use the RowSource property of the combo box, viz
Me.Combobox1.RowSource = Worksheets("myWorkSheet").Range
(myRangeName).Address(true,true,xlA1, true)
replacing the worksheet name as appropriate.
This is slightly more generic than required but it will
enable you to reference cells of non-active worksheets
(even Hidden or VeryHidden sheets)

Kevin Beckham
 

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

Similar Threads


Top