[RESOLVED] Select after searching for VbCrLf
hey guys.
My program searches through a text box looking for all 'VbCrLf' (enter). It finds 5. What i want it to do is select one of them, it dosnt really matter what one. I just need to no how to do this.
(and yes, i cant select nothing, because thats what enter is, i just want the little black line to be there, as if its ready to type from that position.
My Code:
Code:
Private Sub Command1_Click()
MsgBox (InStr(Text1.Text, vbCrLf))
End Sub
Thanks :afrog:
Fen
Re: Select after searching for VbCrLf
Code:
Private Sub Command1_Click()
If InStr(1, Text1.Text, vbCrLf) > 0 Then
Text1.SelStart = InStr(1, Text1.Text, vbCrLf)
Text1.SetFocus
End If
End Sub
Re: Select after searching for VbCrLf