column headings for a list box from a recordset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
You can't. Only if you bind the listbox to data in the worksheet - this
means using the rowsource/listfillrange property.
 
Thanks so much for the help. I will just throw some labels on top of the list
box with the recordset column names.
 

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

Back
Top