LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Multiple Column Listbox

Load it like so

Dim ary, i, j

ary = [{"Bob","M", 123;"Lynne","F",898;"Amy","F",543}]

With ListBox1
For i = 1 To 3
.AddItem ary(i, 1)
For j = 2 To 3
.List(.ListCount - 1, j - 1) = ary(i, j)
Next j
Next i
End With

retrieve it like so

Dim i As Long
Dim j As Long
Dim iRow As Long
iRow = 10
With Me.ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then
For j = 1 To .ColumnCount
ActiveSheet.Cells(iRow, j).Value = .List(i, j - 1)
Next
iRow = iRow + 1
End If
Next i
End With

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
Hello.. I am having trouble finding a way to create a multiple column
list box..
I have two columns of data, assume they are in Sheet1 cells A1:B10
I created the ListBox with Control Toolbox named ListBox1

Regards,

Matt



 
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
Moving Mutli-Column Multiple-Selected Listbox items up or down MP Excel Discussion (Misc queries) 0 January 14th 09 09:34 PM
multi-column listbox on userform, multiple issues KR Excel Programming 2 February 15th 06 07:55 PM
filling a two column listbox from a two column recordset Dennis Excel Programming 5 May 23rd 04 10:13 PM
Multiple column listbox syntex question Martha[_2_] Excel Programming 2 May 7th 04 10:24 PM
Multi-column ListBox. Multiple bound columns??? Joe Mathis Excel Programming 5 December 10th 03 01:32 AM


All times are GMT +1. The time now is 10:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"