Row reference in a listbox
Does anyone know how to create a hidden column in a listbox that has the worksheet row number in relating to list item. I have a search function that returns a list depending on what the user has entered but I now need to be able to select the item in the list and go to the row in the spreadsheet from where it came from. Any ideas?
Re: Row reference in a listbox
In the listbox, there should be a column count - set this to 2 or more.
There should also be a columnwidths property. set this to 0;1 (you can change the size later on).
Then add your data (possibly via .list or .column)
The first column should be invisible (so you can put your Row number/ID in there) and the other column(s) should be visible.
On the on_click event you can get the row number from the hidden column and populate the form.
Re: Row reference in a listbox
Thanks for that, do you know how I put the row number/ID in the hidden column?