Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 167
Default Transpose Combobox ListFillRange

I have a sheet ("Subs") that contains category names. Under each name is a
list of different numbers (nodes). On a different sheet ("Runs") I have a
combobox called "Subsystems" that I want to be filled with the category names
in Subs.

Since the Subs sheet can change, I want the combobox to update via a
Worksheet_Open event. This is easily done if the category names are in a
single column, multiple rows. However, I have to have them in a single row,
multiple columns.

The code below loads the categories, but it loads it into Subsystems as a
single entry with multiple columns.

Is there a way to transpose the categories in Subs so that the combobox is
filled with each column (A1, B1, C1...) is displayed as a seperate entry?

Mike

WorksheetOpen code excerpt:

Set subs = Sheet7.Range("A1")
col = subs.CurrentRegion.End(xlToRight).Column
Set subs = Range(Cells(1, 1), Cells(1, col))
Sheet8.Subsystem.ListFillRange = "Subs!" & subs.Address

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 167
Default Transpose Combobox ListFillRange

It never fails. You work for hours trying to figure something out. Then the
moment you post it to the board, you see the light.

Here's what I did...

Sheet8.Subsystem.Clear
Set subs = Sheet7.Range("A1")
col = subs.CurrentRegion.End(xlToRight).Column
For i = 1 To col
Sheet8.Subsystem.AddItem Sheet7.Cells(1, i).Value
Next


"crazybass2" wrote:

I have a sheet ("Subs") that contains category names. Under each name is a
list of different numbers (nodes). On a different sheet ("Runs") I have a
combobox called "Subsystems" that I want to be filled with the category names
in Subs.

Since the Subs sheet can change, I want the combobox to update via a
Worksheet_Open event. This is easily done if the category names are in a
single column, multiple rows. However, I have to have them in a single row,
multiple columns.

The code below loads the categories, but it loads it into Subsystems as a
single entry with multiple columns.

Is there a way to transpose the categories in Subs so that the combobox is
filled with each column (A1, B1, C1...) is displayed as a seperate entry?

Mike

WorksheetOpen code excerpt:

Set subs = Sheet7.Range("A1")
col = subs.CurrentRegion.End(xlToRight).Column
Set subs = Range(Cells(1, 1), Cells(1, col))
Sheet8.Subsystem.ListFillRange = "Subs!" & subs.Address

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Transpose Combobox ListFillRange


to add a horizontal array to a combo or listbox
use the column property
(iso the list as you would for vertical arrays)

sheet8.subsystem.Column = _
Sheet7.Range("A1", Sheet7.Range("IV1").End(xlToLeft)).Value



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


crazybass2 wrote :

It never fails. You work for hours trying to figure something out.
Then the moment you post it to the board, you see the light.

Here's what I did...

Sheet8.Subsystem.Clear
Set subs = Sheet7.Range("A1")
col = subs.CurrentRegion.End(xlToRight).Column
For i = 1 To col
Sheet8.Subsystem.AddItem Sheet7.Cells(1, i).Value
Next


"crazybass2" wrote:

I have a sheet ("Subs") that contains category names. Under each
name is a list of different numbers (nodes). On a different sheet
("Runs") I have a combobox called "Subsystems" that I want to be
filled with the category names in Subs.

Since the Subs sheet can change, I want the combobox to update via
a Worksheet_Open event. This is easily done if the category names
are in a single column, multiple rows. However, I have to have
them in a single row, multiple columns.

The code below loads the categories, but it loads it into
Subsystems as a single entry with multiple columns.

Is there a way to transpose the categories in Subs so that the
combobox is filled with each column (A1, B1, C1...) is displayed as
a seperate entry?

Mike

WorksheetOpen code excerpt:

Set subs = Sheet7.Range("A1")
col = subs.CurrentRegion.End(xlToRight).Column
Set subs = Range(Cells(1, 1), Cells(1, col))
Sheet8.Subsystem.ListFillRange = "Subs!" & subs.Address

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
combobox listfillrange network Helmut Excel Worksheet Functions 0 April 22nd 09 03:27 PM
Transpose technique not populating ListFillRange of ActiveX combobox JimC[_2_] Excel Discussion (Misc queries) 2 September 6th 08 01:07 PM
ComboBox ListFillRange Stefi Excel Discussion (Misc queries) 14 April 21st 08 12:55 PM
Strange problem with a combobox and ListFillRange teddyk Excel Discussion (Misc queries) 1 August 7th 06 09:16 PM
ComboBox - Changing ListFillRange [email protected] Excel Programming 1 May 10th 04 06:12 PM


All times are GMT +1. The time now is 01:06 PM.

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"