ListBox.ColumnHeads Property

G

Guest

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!
 
T

Tom Ogilvy

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 said:
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.
 
G

Guest

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.
 
J

Jamie Collins

Kevin said:
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=eeIKcz#[email protected]

Whatever happened to that guy? <g>

Jamie.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top