Re-Transfer Row from Listbox to another sheet VBA

  • Hello Sir, I have read and tried to apply a thread here according to the subject I wrote again above but I get a problem that appears 'could not find the specific object' and debug it in Me ("TextBox" & iX - 1). Value = .List (.ListIndex, iX - 1).

    beg for your help, every help is very valuable to me

  • this looks like it is part of a "with" instruction, really need to see the rest of the code to fix it.

    it should be something like:

    1. With Me.ListBox1
    2. Me.Controls("TextBox" & iX - 1).value = .List(.ListIndex, iX - 1)
    3. End With

    where listbox1 is your object of interest.

    You will get a moderator upset if you do not wrap your code in code tags, don't forget to read the rules.



  • apologize profusely sir, I'm still new in Excel VBA issues.

    I will present the rest of the code with your suggestion:

  • sorry, basically my goal is to want to move some data that is in the list sourced from a sheet on another sheet with a combobox option that is in userform

  • If you want to copy the data at the same time you fill the textboxes you could try:

  • Try this:

  • Thank you very much, Mr. Justin

    This code works fine it's just that the ID has changed, how to handle it?

    and for sequence numbers to adjust according to list order?

    sorry for too many requests sir

  • Hi RI,

    I made a couple of changes, there were a couple of errors popping up as I had not set the application.match function only return exact matches, I have added a line to format the column with the ID and the first column now copies a formula to track the row rather than copying the value.

  • Cool, Mr. Justin, this is perfect.

    honestly I am very proud to be joining this group and very grateful to get an answer to my problem.

    Once again, thank you very much, Mr. Justin.

    Mr. RO, I apologize in advance, I work at the Village Government agency. The data I sent was a sample from the Population Master Book, sir.

  • Mr. Justin may I ask again?

    for setting the data transfer between sheets can I move the macro script to CommandButton1 with the format Private Sub CommandButton1_Click ()?