Public Class Form2

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.TextBox1.Focus()
        Me.TextBox1.SelectionStart = InStrRev(TextBox1.Text, TextBox2.Text) - 1
        Me.TextBox1.SelectionLength = Len(TextBox2.Text)
    End Sub
End Class