Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How Do I Add Column Headers to a ComboBox?

How do I add text to the Header area of a 2-column ComboBox? I have the
ColumnHeads property set to True, which causes a blank, outlined header area
to display at the top of my drop-down list, but there's no property that I
can find that contains header text, nor can I find any mention of it in Help.
FYI, I'm loading the ComboBox from a 2D array using a statement like
ComboBoxAddress.Column() = AddressList.

Help says ComboBox data is stored in an array, with indexes starting at
(0,0). The first row in the array doesn't become the headers; if it did, my
header area would be populated with the first row of my data. I've tried
this statement: ComboBoxAddress.List(-1, 0) = "Used" (to populate the column
1 header with the text "Used") since "-1" is often used to signify a special
case and it would be logical since the header is one row before the first row
of data, which is row zero. That statement had no apparent effect.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default How Do I Add Column Headers to a ComboBox?

Theoretically, the cell above your range that is used to populate the
comboBox is the ColumnHeader. I can't get it to work either.

" wrote:

How do I add text to the Header area of a 2-column ComboBox? I have the
ColumnHeads property set to True, which causes a blank, outlined header area
to display at the top of my drop-down list, but there's no property that I
can find that contains header text, nor can I find any mention of it in Help.
FYI, I'm loading the ComboBox from a 2D array using a statement like
ComboBoxAddress.Column() = AddressList.

Help says ComboBox data is stored in an array, with indexes starting at
(0,0). The first row in the array doesn't become the headers; if it did, my
header area would be populated with the first row of my data. I've tried
this statement: ComboBoxAddress.List(-1, 0) = "Used" (to populate the column
1 header with the text "Used") since "-1" is often used to signify a special
case and it would be logical since the header is one row before the first row
of data, which is row zero. That statement had no apparent effect.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default How Do I Add Column Headers to a ComboBox?

I got it to work by listing my data in a column, pick any consecutive series,
C3:C10, with the proposed header in C2. In the Properties window, enter
c3:c10 in the Row Source box and set Column Heads to True. You can use any
range for your row source, If you want two columns then as an example set
c3:d10 as your row source and it will list these in your combo box as two
columns with eight rows and your header will be from C2 and D2 when you set
the column count property to 2.

The help instructions are not very clear, I had to play with it a while to
get it.

"JLGWhiz" wrote:

Theoretically, the cell above your range that is used to populate the
comboBox is the ColumnHeader. I can't get it to work either.

" wrote:

How do I add text to the Header area of a 2-column ComboBox? I have the
ColumnHeads property set to True, which causes a blank, outlined header area
to display at the top of my drop-down list, but there's no property that I
can find that contains header text, nor can I find any mention of it in Help.
FYI, I'm loading the ComboBox from a 2D array using a statement like
ComboBoxAddress.Column() = AddressList.

Help says ComboBox data is stored in an array, with indexes starting at
(0,0). The first row in the array doesn't become the headers; if it did, my
header area would be populated with the first row of my data. I've tried
this statement: ComboBoxAddress.List(-1, 0) = "Used" (to populate the column
1 header with the text "Used") since "-1" is often used to signify a special
case and it would be logical since the header is one row before the first row
of data, which is row zero. That statement had no apparent effect.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How Do I Add Column Headers to a ComboBox?

Just a hint: a quick google search for this group using the appropriate
terminology would have revealed the requirement and probably saved you some
time.

--
Regards,
Tom Ogilvy



"JLGWhiz" wrote in message
...
I got it to work by listing my data in a column, pick any consecutive
series,
C3:C10, with the proposed header in C2. In the Properties window, enter
c3:c10 in the Row Source box and set Column Heads to True. You can use
any
range for your row source, If you want two columns then as an example set
c3:d10 as your row source and it will list these in your combo box as two
columns with eight rows and your header will be from C2 and D2 when you
set
the column count property to 2.

The help instructions are not very clear, I had to play with it a while to
get it.

"JLGWhiz" wrote:

Theoretically, the cell above your range that is used to populate the
comboBox is the ColumnHeader. I can't get it to work either.

" wrote:

How do I add text to the Header area of a 2-column ComboBox? I have
the
ColumnHeads property set to True, which causes a blank, outlined header
area
to display at the top of my drop-down list, but there's no property
that I
can find that contains header text, nor can I find any mention of it in
Help.
FYI, I'm loading the ComboBox from a 2D array using a statement like
ComboBoxAddress.Column() = AddressList.

Help says ComboBox data is stored in an array, with indexes starting at
(0,0). The first row in the array doesn't become the headers; if it
did, my
header area would be populated with the first row of my data. I've
tried
this statement: ComboBoxAddress.List(-1, 0) = "Used" (to populate the
column
1 header with the text "Used") since "-1" is often used to signify a
special
case and it would be logical since the header is one row before the
first row
of data, which is row zero. That statement had no apparent effect.



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
Display index of column headers in column A MZ Excel Discussion (Misc queries) 9 January 17th 10 06:35 PM
lookup using column headers and row headers Memphus01 Excel Discussion (Misc queries) 1 April 13th 09 04:57 PM
make column values column headers dunskii Excel Discussion (Misc queries) 5 September 19th 06 12:00 PM
Excel - returning column headers in a seperate column ExcelConfused Excel Discussion (Misc queries) 1 March 28th 06 02:49 PM
Loop through column headers to search from column name and get cell range Pie Excel Programming 9 December 29th 05 12:17 AM


All times are GMT +1. The time now is 02:26 PM.

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

About Us

"It's about Microsoft Excel"