hpw do i add in text through my code to the rich text box in a different color
Printable View
hpw do i add in text through my code to the rich text box in a different color
Try:
Code:Private Sub Command1_Click()
'Write text in the current color
RichTextBox1.SelText = "Color 1"
'Change the color to blue
RichTextBox1.SelColor = vbBlue
'Write text in our new color (blue)
RichTextBox1.SelText = "Color 2"
End Sub