finding listbox index 0 value in Column A of active worksheet

  • MODERATOR NOTICE: This topic has also been posted on other sites and may already have an answer elsewhere. Please take this into consideration when answering this question


    Hello! how can i code to have the value from userform1. listbox index (0) referenced and found in the active worksheet ("Customers") column "A" and then have column values from that row on the worksheet populate into textboxes when userform2 initializes? The listbox is on single select....

    on userform1. listbox is filled with several customers and multiple columns. Column 1 holds the ID number which is the reference to find in worksheet("Customers").

    So with this customer highlighted on userform1 I will click a command button "Insert Order" also on userform1 in which USERFORM2 will open, the click also activates worksheet ("Customers") and I would also like for this click to execute the code to find the selected listbox index value on the active worksheet and to pull the column values from that row to userform2....

    On userform2...

    textbox14 = worksheet "A".value

    textbox15 =worksheet "B".value

    textbox16 = worksheet "C".value

    textbox17 = worksheet "D".value

    textbox18 =worksheet "E".value

    textbox19 =worksheet "F".value

    Any help with showing how to code this will be greatly appreciated!!!

  • alansidman

    Added the Label Cross Post
  • I do have half the answer to this post.

    I do now have the code that searches out the cell that has the value in it that matches listbox1 listindex(0).

    However, I thought it would be easy to state on my 2nd userform textbox14.text = the value of the active or selected cell but nothing i try works.

    in the 2nd userform initialize i have...

    me.textbox14.text = activecell.value    

    but nothing happens....

    I've also called out


    is there anyone that can help with this. As stated by the moderator this has been asked on MrExcel also.

    if it helps I can post the code that i have in place to activate or select the cell in the worksheet.

    Userform 2 with a listbox populated with several customers...I click or hightlight a customer...i click command button which activates worksheet ("Customers")... it finds the cell in range("A") that is the same as listbox1 listindex(0). The click of the button will also open Userform 3.

    in userform3 I have textbox14 that I want to equal the value in the selected cell.

    As always...any help will be greatly appreciated!!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!