-
Hi
I know how to change the text colour in a rich text box, but how can I change the colour of individual lines of text when they are inserted?
e.g.
rtfOutput.Text = rtfOutput.Text & vbCrLf & "blah blah blah"
How could I make it red for instance without making the text already in the rich text box red also?
Thanks.
-
Use the SelText property to insert text and SelColor to select colour.
With RichTextBox1
.SelStart = Len(.Text)
.SelColor = vbRed
.SelText = vbCrLf & "here's a new line."
End With
Good luck!
------------------
Joacim Andersson
[email protected]
[email protected]
www.YellowBlazer.com
-