Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to write a User Form that has several combo boxes/list boxes whose
values are located on another spreadsheet. How do I reference the ranges from those other sheets? I have a sheet named "Dashboard" that contains the User Form. The data that populates the controls on the form is located in the sheet named "Lists". Any help would be appreciated. Adam |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here's one way you can try. This assumes combobox1 and your list is in A1 to
A15 on the "Lists" sheet. UserForm_Initialize Dim myrange As Range Set myrange = Sheets("Lists").Range("A1:A15") Dim cell as variant For Each cell in myrange If IsEmpty(cell) Then 'skip the cell if it is empty Else combobox1.AddItem cell End if Next cell End sub Hope it helps. Dave "Adrockvt" wrote: I need to write a User Form that has several combo boxes/list boxes whose values are located on another spreadsheet. How do I reference the ranges from those other sheets? I have a sheet named "Dashboard" that contains the User Form. The data that populates the controls on the form is located in the sheet named "Lists". Any help would be appreciated. Adam |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Minimum and maximum value of Axis set by user by reference to form | Charts and Charting in Excel | |||
How to: User Form to assign a user defined range to a macro variab | Excel Programming | |||
copy sheets selected on user form | Excel Programming | |||
copy sheets selected on user form | Excel Programming |