|
-
Nov 4th, 2001, 01:23 PM
#1
Thread Starter
New Member
RichTextBox query
I am trying to write something that will find a word, and highlight it in bold, in some user-entered text.
I am using a richtextbox.
So far I have:
Private Sub Command1_Click()
If InStr(rtbUserText, txtSearchString.Text) Then
rtbUserText.SelText = txtSearchString.Text
rtbUserText.SelBold = True
Else
MsgBox "Word not found"
End If
End Sub
When run, clicking the command button makes the word that is to be found appear on the end of the text in the rtb, but not in bold.
I know that there is something wrong here, but I don't know what! Can anyone help? I just want to highlight the word in bold if it is present, to show that it's been found.
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
|