Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Adding Headers to a listbox

I have a multicolumn listbox that I've been using for sometime. I've
recently decided I want to add column headers to the listbox. I set
columnheads to true, but have not found a way to programmatically add the
header names. How do I do this?

Thanks in advance for reply,
Mike


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Adding Headers to a listbox


I believe you just set the header cell values to what you want them to
be. No special property assignments are necessary for the cell.

So if your headers are in A1, B1, C1

Range("A1") = "myheader1"
Range("B1") = "myheader2"
Range("C1") = "myheader3'

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Adding Headers to a listbox

You have to set RowSource to a spreadsheet range that is just below the
column headers you want, but does not include them.

For example, if your headers are in A1:C1 and the data is in A2:C10, you set
RowSource to A2:C10.

http://support.microsoft.com/kb/211899

--
Jim
"Mike Milligan" wrote in message
...
|I have a multicolumn listbox that I've been using for sometime. I've
| recently decided I want to add column headers to the listbox. I set
| columnheads to true, but have not found a way to programmatically add the
| header names. How do I do this?
|
| Thanks in advance for reply,
| Mike
|
|


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Adding Headers to a listbox

That works great if I'm using Rowsource. How do I get headers when I am
populating the listbox via VBA (ie. the data isn't in a spreadsheet)?

"Jim Rech" wrote in message
...
You have to set RowSource to a spreadsheet range that is just below the
column headers you want, but does not include them.

For example, if your headers are in A1:C1 and the data is in A2:C10, you
set
RowSource to A2:C10.

http://support.microsoft.com/kb/211899

--
Jim
"Mike Milligan" wrote in message
...
|I have a multicolumn listbox that I've been using for sometime. I've
| recently decided I want to add column headers to the listbox. I set
| columnheads to true, but have not found a way to programmatically add
the
| header names. How do I do this?
|
| Thanks in advance for reply,
| Mike
|
|




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
Adding Headers and Footer to an Entire Workbook?? Spyder Excel Discussion (Misc queries) 5 February 25th 10 03:46 PM
Adding item in listbox volabos Excel Worksheet Functions 0 December 3rd 07 11:47 AM
Adding item in listbox volabos Excel Worksheet Functions 0 December 3rd 07 11:27 AM
Reading Row headers into a listbox Steve Excel Programming 5 June 13th 06 04:21 PM
Populating Column Headers in a ListBox KL[_4_] Excel Programming 4 September 1st 04 12:55 PM


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