i have created the code..but it selects only the first text..for example
if I enter HelloWorldHello and request Hello to be selected...only the first part is selected..
Option Explicit
Private Sub Command1_Click()
Dim i As Integer
i = InStr(1, Text1.Text, Text2.Text)
If i = 0 Then
MsgBox "String not found"
Else
Text1.SetFocus
Text1.SelStart = i - 1
Text1.SelLength = Len(Text2.Text)
End If
End Sub


