How do I change part of a RTB control's text color? For instance
<Andy> hello
<Andy> how are you?
I just want to change <Andy> to a different color on each new line?
Help please...
ande211
Printable View
How do I change part of a RTB control's text color? For instance
<Andy> hello
<Andy> how are you?
I just want to change <Andy> to a different color on each new line?
Help please...
ande211
Hi, there.
Put this code on CommandButton click event:
If lFound < 0 Then 'Find First
lFound = RichTextBox1.Find("Andy", 0)
RichTextBox1.SelColor = vbRed
Else
'Find Next
lFound = RichTextBox1.Find("Andy", lFound + 1)
RichTextBox1.SelColor = vbRed
End If
Larisa
[This message has been edited by LG (edited 01-25-2000).]