dim start as integer
start = Form1.RichTextBox1.SelectionStart
start = start + 1
MsgBox(start)
Try
Form1.RichTextBox1.Find(TextBox1.Text, start, RichTextBoxFinds.None)
Catch ex As Exception
MsgBox("The text was not found", MsgBoxStyle.Information, "VBS Create")
End Try
Public Class ReplaceStr
Dim start As Integer
Dim first As Boolean = True
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
start = Form1.TextBox1.SelectionStart
Try
Form1.TextBox1.Find(TextBox1.Text, start, RichTextBoxFinds.None)
Form1.TextBox1.Focus()
If first = False Then
start = start + 1
End If
first = False
Catch ex As Exception
MsgBox("The text was not found", MsgBoxStyle.Information, "VBS Create")
End Try
End Sub
End Class