Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rich text box font colour

Status
Not open for further replies.

mikemcginty

Programmer
Jul 11, 2002
184
AU
How do I programatically change the font colour of a rich text box?

Thanks When you call out for help in the darkness, and you hear a voice in return, you're probably just talking to yourself again!
 
Sorry. Just did a search including "color" instead of "colour" (aussie speak) and found the following info

Option Explicit

Private Sub Form_Load()
With RichTextBox1
.Text = ""
.SelBold = True
.SelColor = vbBlue
.SelText = "bold-blue"
.SelStart = 64& * 1024 ' move to end
.SelColor = vbRed
.SelBold = False
.SelItalic = True
.SelText = vbCrLf & "italic-red"
End With
End Sub When you call out for help in the darkness, and you hear a voice in return, you're probably just talking to yourself again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top