Public Function ChangeColor(RT As RichTextBox, StrStart As String, StrEnd As String, Color As Long)
Dim Text As String
Dim N As Long
Text = RT.Text
N = InStr(Text, StrStart)
Do While CBool(N)
Mid(Text, N, Len(StrStart)) = String(Len(StrStart), "?")
RT.SelStart = N + Len(StrStart)
N = InStr(Text, StrEnd)
If CBool(N) Then
Mid(Text, N, Len(StrEnd)) = String(Len(StrEnd), "?")
RT.SelLength = N - RT.SelStart - 1
RT.SelColor = Color
RT.SelStart = 0
End If
N = InStr(Text, StrStart)
DoEvents
Loop
If CBool(RT.SelStart) Then
RT.SelLength = Len(RT.Text) - RT.SelStart
RT.SelColor = color
End If
End Function
ChangeColor RT, ":", vbNewLine, vbBlue
, lo hize a prisas XD