Results 1 to 3 of 3

Thread: Row reference in a listbox

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2005
    Posts
    22

    Question 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?

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    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.

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2005
    Posts
    22

    Re: Row reference in a listbox

    Thanks for that, do you know how I put the row number/ID in the hidden column?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width