Is it possible to set up the headers in a multicolumn listbox without using a worksheet range as the source?
The following uses an array of variants which is assigned to the list property of the listbox, the headers appear blank.
Sub testMultiColumnLb() ReDim arr(1 To 3, 1 To 2) arr(1, 1) = '1' arr(1, 2) = 'One' arr(2, 1) = '2' arr(2, 2) = 'Two' arr(3, 1) = '3' arr(3, 2) = 'Three' With ufTestUserForm.lbTest .Clear .ColumnCount = 2 .List = arr End With ufTestUserForm.Show 1 End Sub
No. I create labels above the listbox to serve as headers. You might think that it’s a royal pain to change labels every time your lisbox changes. You’d be right – it is a pain. It’s a pain to set up the first time, much less changes. But I haven’t found a better way.