Is it possible to populate the Listbox column headers coming from recordset or array and not from range from excel spreadsheet?
Is it possible to populate the Listbox column headers coming from recordset or array and not from range from excel spreadsheet?
Sorry but the answer is no, the only way you can have 'real' headers is if you populate from a range.
There are a number of workarounds though, for example you could create a set of small labels just above the listbox for the headers.
Or, and this is kind of my favourite, create a one row listbox positioned just above the listbox with the data.
This listbox would have the same column widths as the main one and it's one row would be populated with the headers.
If posting code please use code tags, see here.
Thanks Norie for your answer. Actually, there are 30 columns that i would populate in the listbox. Small labels seems not fitted for this since listbox will create a 'scroll' and the labels would not follow. Also for creating one row listbox, since it will create a new scroll right?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks