Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a file "File01.xls" with a range "List". This file has a UserForm1
with a ComboBox where the RowSource is range "List". The UserForm is accessible from any open file. How do I set the RowSource to the "List" range so it works regardless of the current active workbook. I get an error when the current active file is not "File01.xls". Thank you, Steven |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do you want to use the active workbook's List range name or confine it to
one workbook? If one workbook: Dim rowSrc As String rowSrc = Workbooks("File01.xls").Names("List").RefersToRang e.Address(External:=True) UserForm1.ComboBox1.RowSource = rowSrc ' Or Me.Combobox1 if the code is in the userform or if the active workbook: Dim rowSrc As String rowSrc = ActiveWorkbook.Names("List").RefersToRange.Address (External:=True) UserForm1.ComboBox1.RowSource = rowSrc -- Tim Zych http://www.higherdata.com Workbook Compare - free and pro versions "Steven" wrote in message ... I have a file "File01.xls" with a range "List". This file has a UserForm1 with a ComboBox where the RowSource is range "List". The UserForm is accessible from any open file. How do I set the RowSource to the "List" range so it works regardless of the current active workbook. I get an error when the current active file is not "File01.xls". Thank you, Steven |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combo Box Data Source | Excel Programming | |||
Combo Box row Source | Excel Programming | |||
Combo Box Row source problem | Excel Programming | |||
Combo box Row source | Excel Programming | |||
Combo Source from another file | Excel Programming |