Populating Column Headers in a ListBox
Harald, thanks for the quick reply. What if I do the
below? How would I then set the first row values to
populate the column headings? Thanks.
------------Code Start------------
Private Sub UserForm_Initialize()
cCounter = Sheets("DBASE").UsedRange.Columns.Count
myRange = Sheets("DBASE").UsedRange.Address
lb1.RowSource = myRange
lb1.ColumnHeads = True
lb1.ColumnCount = cCounter
End Sub
------------Code End------------
-----Original Message-----
Hi
Listbox column headers work only when a listbox'
Listfillrange / Rowsource
is set to a range of cells that has a header row. You
can't do it populating
by code.
HTH. best wishes Harald
"KL" skrev i melding
...
Hi there,
I am using the following code to populate a listbox with
multiple-column entries. My problem is I can't find a
way
to populate the columns' headers too. Any ideas muchly
appreciated.
KL
.
|