VBA Multi-column list box from sheet columns
excel, listbox, vba
Solution
lbData is the listbox, change Sheet2 as appropriate to reference your data. Add the below in the userform:
Private Sub UserForm_Initialize()
With Me.lbData
.ColumnCount = 3
.ColumnWidths = "33;33;33"
.RowSource = Sheet2.Range("A1:C10").Address
End With
End Sub
Problem
I've got a spreadsheet with two sheets, lets call them Sheet A and Sheet B. From Sheet A, I click a button and it opens a form with a listbox. Sheet B has 10 columns of data. I want to select 3 of these columns contents, (A, B, F). And display them in this one listbox in different columns but it just isn't working and can't find the correct way to do this.. This is what I have so far: git://gist.github.com/4131461.git So in the end I want a list box with 3 columns, each populate with the ranges 1-10 from 3 columns.. I just started doing VBA and I have no idea how to do this.. Help?