I am trying to get the output of a string "A B C D E" etc to output to a label or a text box to have different colors for each character, for a kids learning program. I have just learned about the richtextbox, but I do not know how to use it, rtb.selcolor = vbRed will not work:
'=============================================
Private Sub Command1_Click()
Dim a1 As String
Dim a2 As String
a1 = "a b c "
a2 = "d e f"
RichTextBox1.SelColor = vbRed 'this does not work, the output is still black
RichTextBox1.Text = a1
End Sub
'============================================
I am about to pull out my hair, I just need "A" to be one color, "B" to be another color etc, it can not be that difficult can it? (obviously I want the sequence of the output to be different each run)
STRING1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
LABEL1.CAPTION = MID(STRING1,1,1)
'NEW COLOR AND DO AGAIN: "THIS IS AN EXAMPLE OF THE SORT OF THING I AM TRYING TO DO"
Many thanks if you can help, I have been on the web all day.