Hello All,
I really thought this was going to be easy but I am surprised to find that I'm racking my brain and there doesn't seems to be any solutions online - at least not what I have been able to find.
How can I add the the values in row 1 to the headers row in the image below (into the empty boxes)?
Image1.JPG
My code is below.
RowCount = Sheets("Action Steps ListBox").Range("A1048576").End(xlUp).Row
ListBox1.List = Sheets("Action Steps ListBox").Range("A1:F" & RowCount).Value
Me.ListBox1.ColumnWidths = "20;60;60;60;60;60"
I am currently using a range to add the values to the listbox but Ideally I want to just have some function to add labels.
i.e.
Me.ListBox1.List(0,0) = "#"
But i realize that is will yield the same result I am getting - meaning, the use of "Me.ListBox1.List(0,0)" will add to row 1 and not the header column!
I want to say that there has to be some function like:
Me.ListBox1.ColumnHeads(0,0).value = "#"
for example, but I haven't found anything like this. AND, I guess I don't know what the ".ColumnHeads" functionality is used for if the cells will be empty - seems useless.
I have tested using the source data in the worksheet as a Table and then the column headers are added correctly, but I have found in the past that userforms interacting with Tables can bog down the program and cause problems, so I would rather not go that route.
Any help would be greatly appreciated!
Thanks,
Jason
Bookmarks