for all the properties of the rich text box you can visit these sites
http://exchange.manifold.net/manifold/m ... xt_Box.htm
and dont forget to set focus after the final step i mentioned that
this is one exampole of how to use selstart etcetc
Private Sub Form_Load ()
Text1.Text = "Two of the peak human experiences"
Text1.Text = Text1.Text & " are good food and classical music."
End Sub
Private Sub Form_Click ()
Dim Search, Where ' Declare variables.
' Get search string from user.
Search = InputBox("Enter text to be found:")
Where = InStr(Text1.Text, Search) ' Find string in text.
If Where Then ' If found,
Text1.SetFocus
Text1.SelStart = Where - 1 ' set selection start and
Text1.SelLength = Len(Search) ' set selection length.
Else
MsgBox "String not found." ' Notify user.
End If
End Sub
found it in Microsoft website
--DAFUNKYMUNKY