Use named range in excel sheet to propagate list

This way I have several namedRanges in an excel sheet. I would like to use them to populate comboboxes in a user form in the same WorkBook.

I tried:

cboMember.DataSource = Globals.Sheet1.MemberRange.Value

      

No error specified, but the combo is empty. Anyone have any ideas?

I am trying to use VSTO for VS 2008 in an excel 2003 workbook.

+2


a source to share


2 answers


cboMember.RowSource = "NamedRange"



You are not setting it for an object. Set it to string. Excel shows the rest.

+2


a source


It's a bit of a guess, but I believe in VBA that you can do something like simple Range("MyRangeName")

to get a named range so you can try its equivalent.



Some ranges in Excel are local to the sheet, some are global to the workbook. If they are local to a sheet, you need to prefix with the sheet name, eg. Range("Sheet1!MyRangeName")

...

+2


a source







All Articles