Bagharmin
Board Regular
- Joined
- Nov 22, 2010
- Messages
- 168
I have a multi-column ListBox and I'm trying to add column headers to it. I've set the ColumnHeads property to "True". The data that I want to display is dropped onto a separate sheet and sorted, with the column headers I want on the first row and the data itself starting at row 2. I then use the RowSource property to identify all the data, including the first row:
There will always only be 5 columns, but there could be any number of rows. My only problem is that, when I show the EmployeeList userform, my column headers show up as the first row of data and the actual column headers say "Column A", "Column B", and so on.
What do I need to do differently to get the column headers on my sorting sheet to actually show up as the column headers in the ListBox?
Thanks.
Code:
EmployeeList.ListBox1.RowSource = "'Sort Sheet'!$A$1:$E$" & PTOs + 1
There will always only be 5 columns, but there could be any number of rows. My only problem is that, when I show the EmployeeList userform, my column headers show up as the first row of data and the actual column headers say "Column A", "Column B", and so on.
What do I need to do differently to get the column headers on my sorting sheet to actually show up as the column headers in the ListBox?
Thanks.