Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default Creating a named range?

Could someone please help? I'm having trouble creating a named range,
and adding that range to a ComboBox. The range that I want to add is
horizontal, cells A1:E1, calling it "Test". When I add "Test" to
ComboBox by doing ComboBox1.ListFillRange = "Test", it only shows A1
in the dropdown. But when I change the named range to VERTICAL,
cells A1:A5, everything works out perfectly. Can you not create
horizontal named ranges? Are my ComboBox properties not set
right?....
Please help.

DK

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 533
Default Creating a named range?

The list fill range must be vertical. If you insist on a horizontal range
you'll have to populate the combobox by a macro. This example code assumes
the combobox is on a worksheet.

Sub FillCombo()
Dim Cell As Range
With Worksheets("Sheet1")
For Each Cell In .Range("Test")
.ComboBox1.AddItem Cell.Value
Next
End With
End Sub

The combobox will not remember the list when the sheet is saved and reopened
so you'd have to run this when the workbook is opened. Better just to go
with a vertical list.

--
Jim
"dksaluki" wrote in message
...
| Could someone please help? I'm having trouble creating a named range,
| and adding that range to a ComboBox. The range that I want to add is
| horizontal, cells A1:E1, calling it "Test". When I add "Test" to
| ComboBox by doing ComboBox1.ListFillRange = "Test", it only shows A1
| in the dropdown. But when I change the named range to VERTICAL,
| cells A1:A5, everything works out perfectly. Can you not create
| horizontal named ranges? Are my ComboBox properties not set
| right?....
| Please help.
|
| DK
|


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default Creating a named range?

ok, i will try to use vertical list.

i did also try the .AddItem method to add each cell item to the
combobox list. I got a "permission denied error"! story of my life!
...BUT that's another problem.

thanks. i will use vertical list.

dk
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
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
automatic range - named range give me circular reference... George Thorogood Excel Discussion (Misc queries) 0 February 22nd 07 07:53 PM
Array as a "named range" - formula ok in cells, but error as "named range" tskogstrom Excel Discussion (Misc queries) 11 December 28th 06 04:44 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
Can I use named range in data range box when creating pie chart? BJackson Charts and Charting in Excel 2 August 17th 05 05:37 PM


All times are GMT +1. The time now is 03:02 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"