Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm fill by Range
I have a Listbox I'd like to fill using a Range. My Range is named "Months"
and is located in cells "D1:O1" In Rowsource, I have "Months" (no quotes) For some reason it only displays the first value and nothing beyond that. How do I get it to list all of the values in that range? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm fill by Range
You can't use a "Horizontal" (single row) range with rowsourceand get other
than what you are experiencing. Why not create a vertical range (Single column) or do it with code. Private Sub Userform_Initialize() listbox1.rowsource = "" listbox1.List = Application.Transpose(Range("Months")) End sub -- Regards, Tom Ogilvy "StephanieH" wrote: I have a Listbox I'd like to fill using a Range. My Range is named "Months" and is located in cells "D1:O1" In Rowsource, I have "Months" (no quotes) For some reason it only displays the first value and nothing beyond that. How do I get it to list all of the values in that range? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm fill by Range
Works perfectly.
Thanks Tom. "Tom Ogilvy" wrote: You can't use a "Horizontal" (single row) range with rowsourceand get other than what you are experiencing. Why not create a vertical range (Single column) or do it with code. Private Sub Userform_Initialize() listbox1.rowsource = "" listbox1.List = Application.Transpose(Range("Months")) End sub -- Regards, Tom Ogilvy "StephanieH" wrote: I have a Listbox I'd like to fill using a Range. My Range is named "Months" and is located in cells "D1:O1" In Rowsource, I have "Months" (no quotes) For some reason it only displays the first value and nothing beyond that. How do I get it to list all of the values in that range? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Use named range to fill Userform combobox XL2003? | Excel Programming | |||
Userform - with Commandbutton fill a Listbox with data.. | Excel Programming | |||
Fill-in Range from UserForm | Excel Programming | |||
UserForm when opening workbook will not fill screen | Excel Programming | |||
Fill-in Range from UserForm | Excel Programming |