gibbo1715
01-27-2005, 04:24 AM
Hope this is a simple one for you
I have the code below to display a 2 column multilistbox from a dynamic array
Dim Rng As Range
Dim Cell As Range
Me.ListBox1.Clear
With ThisWorkbook.Sheets("Exhibits")
Set Rng = .Range("A2", .Range("A65536").End(xlUp))
End With
For Each Cell In Rng.Cells
With Me.ListBox1
Me.ListBox1.AddItem Cell.Offset(0, 2).Value
.List(.ListCount - 1, 1) = Cell.Value
End With
Next Cell
How can I make it for a 4 column listbox?
I have the code below to display a 2 column multilistbox from a dynamic array
Dim Rng As Range
Dim Cell As Range
Me.ListBox1.Clear
With ThisWorkbook.Sheets("Exhibits")
Set Rng = .Range("A2", .Range("A65536").End(xlUp))
End With
For Each Cell In Rng.Cells
With Me.ListBox1
Me.ListBox1.AddItem Cell.Offset(0, 2).Value
.List(.ListCount - 1, 1) = Cell.Value
End With
Next Cell
How can I make it for a 4 column listbox?