Proper way to select (goto) row column and cell of data once found via multiple (12) sheets

  • Thanks for any help - I am using a search form (below) to locate data upon CommandButton1_Click(). I am need now how to actualy go to that row / cell and in column B via CommandButton2_Click().

    Private Sub CommandButton1_Click()

    Dim ws As Worksheet, v As Variant

    'If not found

    TextBox2.Text = "Cloud Record Not Found"

    For Each ws In Worksheets

    v = Application.Match(Val(TextBox1.Text), ws.Range("B5:B2400"), 0)

    If Not IsError(v) Then

    'If data found

    TextBox2.Text = ws.Range("A5:A2400")(v).Value

    'row number

    TextBox3.Text = 4 + v

    Exit For

    End If

    Next ws

    End Sub

    My every attempt has me jumping to wrong pages and/or wrong rows - I am very very new to VBA so thanks again

  • Hello,

    May be following could help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

Participate now!

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