Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default column headings for a list box from a recordset

This is probably (and hopefully) simple, but my eyes are seeing blurry from
all the time in the help screens and I still can't find the solution.

I have a recordset . I have a multi-column list box with columnheads set to
true.
I have assigned values from the recordset to the list box as follows:
lst.Column() = rs.GetRows

How in VBA can I populate the column headings in the list box with the
column names in the recordset (e.g., rs(0).Name)

Thanks for any help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default column headings for a list box from a recordset

You can't. Only if you bind the listbox to data in the worksheet - this
means using the rowsource/listfillrange property.

--
Regards,
Tom Ogilvy


"in-over-his-head-bill" wrote:

This is probably (and hopefully) simple, but my eyes are seeing blurry from
all the time in the help screens and I still can't find the solution.

I have a recordset . I have a multi-column list box with columnheads set to
true.
I have assigned values from the recordset to the list box as follows:
lst.Column() = rs.GetRows

How in VBA can I populate the column headings in the list box with the
column names in the recordset (e.g., rs(0).Name)

Thanks for any help.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default column headings for a list box from a recordset

Thanks so much for the help. I will just throw some labels on top of the list
box with the recordset column names.

"Tom Ogilvy" wrote:

You can't. Only if you bind the listbox to data in the worksheet - this
means using the rowsource/listfillrange property.

--
Regards,
Tom Ogilvy


"in-over-his-head-bill" wrote:

This is probably (and hopefully) simple, but my eyes are seeing blurry from
all the time in the help screens and I still can't find the solution.

I have a recordset . I have a multi-column list box with columnheads set to
true.
I have assigned values from the recordset to the list box as follows:
lst.Column() = rs.GetRows

How in VBA can I populate the column headings in the list box with the
column names in the recordset (e.g., rs(0).Name)

Thanks for any help.

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
Worksheet has numeric column headings. Change to alpha headings? Be Frank Excel Discussion (Misc queries) 1 June 18th 08 04:22 PM
Column headings to numbers and row headings to alphabets? Juliana Excel Discussion (Misc queries) 2 May 9th 08 05:58 PM
How do I keep column headings from showing on a list? Kikipelli2000 Excel Worksheet Functions 2 June 9th 06 10:13 AM
Can I invert a table so row headings are now column headings etc Sharon Excel Worksheet Functions 3 February 10th 05 07:28 PM
List Box Column Headings Richard Mogy Excel Programming 3 September 16th 04 04:45 AM


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