Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use named range to fill Userform combobox XL2003? Keith Excel Programming 1 January 5th 07 04:11 PM
Userform - with Commandbutton fill a Listbox with data.. Arjan[_2_] Excel Programming 1 September 9th 06 07:24 PM
Fill-in Range from UserForm JK Excel Programming 2 March 21st 06 02:09 AM
UserForm when opening workbook will not fill screen Anna B Excel Programming 4 February 28th 06 07:48 PM
Fill-in Range from UserForm JK Excel Programming 3 October 15th 05 04:32 PM


All times are GMT +1. The time now is 06:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"