Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Filling a listbox whith recordset data

Hi,

Is it possible to see records with multiple fields in a ListBox whith
multiple columns?

Thanks

Luis


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Filling a listbox whith recordset data

yes, just set the columncount property. (listbox from the control toolbox
toolbar)

--
Regards,
Tom Ogilvy

"LuisM" wrote in message
...
Hi,

Is it possible to see records with multiple fields in a ListBox whith
multiple columns?

Thanks

Luis



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Filling a listbox whith recordset data

Thank you Tom. I need something mo some code that allows me fill column
by column in the Listbox.

Thanks again

Luis

"Tom Ogilvy" escribió en el mensaje
...
yes, just set the columncount property. (listbox from the control toolbox
toolbar)

--
Regards,
Tom Ogilvy

"LuisM" wrote in message
...
Hi,

Is it possible to see records with multiple fields in a ListBox whith
multiple columns?

Thanks

Luis





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Filling a listbox whith recordset data

That's the problem when you put key information in the subject and not in
the body - it might not be seen as it wasn't seen by me.


http://support.microsoft.com/default...61&Product=xlw
XL2000: How to Use ADO to Return Data to a ListBox or ComboBox


this shows a single column using additem

after
UserForm1.ListBox1.AddItem rstEmployees!lName
use code like
With userform1.Listbox1
.AddItem rstEmployees!Name
.List(.listcount,1) = ' the corresponding value from another column
.List (.Listcount,2) = ' the corresponding value from a 3rd column
End with

You also might want to try

Userform1.List = Application.Transpose(rstEmployees)

in xl2000 and earlier, application.Transpose only works with an array of
5461 elements.

--
Regards,
Tom Ogilvy


"LuisM" wrote in message
...
Thank you Tom. I need something mo some code that allows me fill column
by column in the Listbox.

Thanks again

Luis

"Tom Ogilvy" escribió en el mensaje
...
yes, just set the columncount property. (listbox from the control
toolbox toolbar)

--
Regards,
Tom Ogilvy

"LuisM" wrote in message
...
Hi,

Is it possible to see records with multiple fields in a ListBox whith
multiple columns?

Thanks

Luis







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Filling a listbox whith recordset data

Tom, thank you. The code that you suggested me worked fine. The Transpose
property seems not to be recongnized by the application.

Regards

Luis

"Tom Ogilvy" escribió en el mensaje
...
That's the problem when you put key information in the subject and not in
the body - it might not be seen as it wasn't seen by me.


http://support.microsoft.com/default...61&Product=xlw
XL2000: How to Use ADO to Return Data to a ListBox or ComboBox


this shows a single column using additem

after
UserForm1.ListBox1.AddItem rstEmployees!lName
use code like
With userform1.Listbox1
.AddItem rstEmployees!Name
.List(.listcount,1) = ' the corresponding value from another column
.List (.Listcount,2) = ' the corresponding value from a 3rd column
End with

You also might want to try

Userform1.List = Application.Transpose(rstEmployees)

in xl2000 and earlier, application.Transpose only works with an array of
5461 elements.

--
Regards,
Tom Ogilvy


"LuisM" wrote in message
...
Thank you Tom. I need something mo some code that allows me fill
column by column in the Listbox.

Thanks again

Luis

"Tom Ogilvy" escribió en el mensaje
...
yes, just set the columncount property. (listbox from the control
toolbox toolbar)

--
Regards,
Tom Ogilvy

"LuisM" wrote in message
...
Hi,

Is it possible to see records with multiple fields in a ListBox whith
multiple columns?

Thanks

Luis









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
filling userform listbox simonhall[_4_] Excel Programming 2 June 16th 06 01:43 AM
Populating a multi column listbox with ADO Recordset Paul Faulkner Excel Programming 2 September 16th 05 07:10 PM
EASIER WAY THAN FILLING A RECORDSET? What-a-Tool Excel Programming 1 September 17th 04 10:51 PM
filling a two column listbox from a two column recordset Dennis Excel Programming 5 May 23rd 04 10:13 PM
How to populate a multi-column activeX listbox on a spreadsheet with an ADO recordset quartz Excel Programming 1 May 3rd 04 10:13 PM


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