Select row using input box value

  • Hi,

    I’ve come to a point where I’m confused & unable to continue.
    I have a user form where I enter the values into each TextBox.
    I then use a command button of which shows me the InputBox.


    I would enter a number in the InputBox & click ok.


    Now here is where I’ve failed for a few hours trying various non working options.


    Example.
    Say I entered 7 in the InputBox.
    I then would like the user form values to be inserted / pasted into row 7.

    This should be a simple task but for some reason it’s got me this time.

    Here is my code.


  • These names are rounds for which i travel.

    So i look at the worksheet & see where i need to add the new customer.

    So by looking at the round i would then select the row for it to be added

  • Try this


  • must of been when i got confused and stopped.


    its this part but not sure how to edit it for the input box number


    With ThisWorkbook.Worksheets("GRASS")

    .Rows(z).EntireRow.Insert Shift:=xlDown

    For i = 0 To UBound(ControlsArr)

    Select Case i

    Case 3

    .Cells(4, i + 1) = Val(ControlsArr(i))

    ControlsArr(i).Text = ""

    Case Else

    .Cells(4, i + 1) = ControlsArr(i)

    ControlsArr(i).Text = ""

    End Select

    Next i

    End With

  • Welcome to the Forum. Please read the Forum Rules to understand how the Forum works and why I have added Code Tags to your post


    All VBA code posted in the forum must be wrapped in code tags, which you omitted, including single-line code snippets.Be sure to use them in future posts.


    How to use code tags


    Just highlight all of the code and press the <> in the post menu above button to add the code tags.


    Thanks.


    I've added them for you and will look at this shortly

  • Try this