Use VBA to Populate Listbox from Open Spreadsheet
here's another way. (this assumes your 3 column all next to each
other.) this should get you started, may have to tweak the line that
fills the array a little:
Private Sub UserForm_Click()
Dim rowCount As Integer
Dim myArray() As Variant
Dim i As Integer
'get row count and fill array
rowCount = Cells(Rows.Count, "A").End(xlUp).Row
myArray = Range("A1:C" & rowCount).Value
'fill listBox1
Me.ListBox1.ColumnCount = 3
myArray = WorksheetFunction.Transpose(myArray)
Me.ListBox1.Column = myArray
End Sub
|