|
-
Aug 7th, 2007, 02:17 AM
#1
Thread Starter
Lively Member
[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
Fen
-
Aug 7th, 2007, 02:30 AM
#2
Frenzied Member
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
-
Aug 7th, 2007, 02:33 AM
#3
Thread Starter
Lively Member
Re: Select after searching for VbCrLf
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|