Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 504
Default ListBox.ColumnHeads Property

I am using a ListBox to display some multicolumn data and am trying to use the ColumnHeads property to display, well ..., column heads. I set the property to True, but can't find any reference in the help to how to enter the names of the column heads.

The help files did mention, "When the system uses the first row of data items as column headings, they can't be selected", but shed no light on how to accomplish this.

Any help would be appreciated. Thanks!

--
Kevin
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default ListBox.ColumnHeads Property

You have to bind your control to the data using the rowsource (userform) or
listfillrange (worksheet) property. Then the column heading is the row
above the range you bind to.

so if you set the rowsource to

Sheet1!A2:C20

then sheet1!A1:C1 will display as the column heads if you set columnheads
property to true.

--
Regards,
Tom Ogilvy

"Kevin" wrote in message
...
I am using a ListBox to display some multicolumn data and am trying to use

the ColumnHeads property to display, well ..., column heads. I set the
property to True, but can't find any reference in the help to how to enter
the names of the column heads.

The help files did mention, "When the system uses the first row of data

items as column headings, they can't be selected", but shed no light on how
to accomplish this.

Any help would be appreciated. Thanks!

--
Kevin



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 504
Default ListBox.ColumnHeads Property

Thanks for responding.

It is currently not bound to anything. I am doing some processing in the background and which generates a list of items that I have been adding using the AddItems method of ListBox.

Is there any way to achieve ColumnHeads without using the ListBox as a bound control? If not, that seems rather shortsighted and limiting.
--
Kevin


"Tom Ogilvy" wrote:

You have to bind your control to the data using the rowsource (userform) or
listfillrange (worksheet) property. Then the column heading is the row
above the range you bind to.

so if you set the rowsource to

Sheet1!A2:C20

then sheet1!A1:C1 will display as the column heads if you set columnheads
property to true.

--
Regards,
Tom Ogilvy

"Kevin" wrote in message
...
I am using a ListBox to display some multicolumn data and am trying to use

the ColumnHeads property to display, well ..., column heads. I set the
property to True, but can't find any reference in the help to how to enter
the names of the column heads.

The help files did mention, "When the system uses the first row of data

items as column headings, they can't be selected", but shed no light on how
to accomplish this.

Any help would be appreciated. Thanks!

--
Kevin




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default ListBox.ColumnHeads Property

"Kevin" ...

I am doing
some processing in the background and which generates
a list of items that I have been adding using the
AddItems method of ListBox.

Is there any way to achieve ColumnHeads without using
the ListBox as a bound control? If not, that seems
rather shortsighted and limiting.


Here's some good advice from history:

http://groups.google.com/groups?selm... west.msn.net

Whatever happened to that guy? <g

Jamie.

--
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default ListBox.ColumnHeads Property

I forgot to mention, you may like to try the code recently posted
he

http://groups.google.com/groups?selm...g .google.com

Jamie.

--
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
listbox shrinks to a line when changing between sheets if I use the visible property bikerchick Excel Programming 0 July 7th 04 04:07 PM
Listbox ColumnHeads Dave Baranas[_2_] Excel Programming 6 December 8th 03 10:13 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM
ListBox ColumnHeads Soniya Excel Programming 1 October 7th 03 12:50 PM
Listbox text property not working correctly Shawn[_2_] Excel Programming 2 October 2nd 03 02:35 PM


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