I have listbox that adjust to screen resolution of user computer. Since it is also auto-fit it's columns in some cases scrollbar appear so user could view all columns in listbox!
Since I didn't want to use column header option of listbox I've put labels above listbox of each column.
Of course in case of scrollbar appearance labels remains static and doesn't move along with listbox causing a confusion.
How to move labels with the listbox in case scrollbar appear? Or how to move two listbox simultaneously in case of scrollbar appearance?
I've tried using two listbox where one is showing just 1st row (header) in style I prefer, and second as body, and tried with following code to "attach" them one to another:
Private Sub ListBox1_Click()
ListBox2.ListIndex = ListBox1.ListIndex
End Sub
But with no luck! Listbox2 doesn't move along with ListBox1!
*EDIT:
Sorry, I wasn't aware I'm breaking the rules! Here is link to same thread in another forum:
https://www.mrexcel.com/forum/excel-...ml#post5038213
Bookmarks