PC Review


Reply
Thread Tools Rate Thread

Adding Headers to a listbox

 
 
Mike Milligan
Guest
Posts: n/a
 
      18th Oct 2006
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 With Quote
 
 
 
 
robotman@gmail.com
Guest
Posts: n/a
 
      18th Oct 2006

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'

 
Reply With Quote
 
Jim Rech
Guest
Posts: n/a
 
      18th Oct 2006
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" <(E-Mail Removed)> wrote in message
news:%23e1$(E-Mail Removed)...
|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 With Quote
 
Mike Milligan
Guest
Posts: n/a
 
      18th Oct 2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%23e1$(E-Mail Removed)...
> |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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Listbox headers Robert Crandal Microsoft Excel Programming 3 6th Mar 2010 08:01 PM
Userform Listbox Headers???? TotallyConfused Microsoft Excel Programming 0 11th Sep 2009 09:24 PM
Repost of Listbox Headers Mike Milligan Microsoft Excel Programming 1 19th Oct 2006 12:35 AM
Listbox Headers gjameson via AccessMonster.com Microsoft Access Form Coding 2 18th Jul 2006 01:11 PM
Listbox headers Chris Microsoft Access Getting Started 2 8th Feb 2006 10:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:27 AM.