Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display index of column headers in column A | Excel Discussion (Misc queries) | |||
lookup using column headers and row headers | Excel Discussion (Misc queries) | |||
make column values column headers | Excel Discussion (Misc queries) | |||
Excel - returning column headers in a seperate column | Excel Discussion (Misc queries) | |||
Loop through column headers to search from column name and get cell range | Excel Programming |