VB Code:
  1. Private Sub ChangeColor(ByVal word As String, ByVal clr As Color, ByVal rtb As RichTextBox, Optional ByVal start As Integer = 0)
  2.         'find word
  3.         Dim ret As Integer = rtb.Find(word, start, RichTextBoxFinds.WholeWord)
  4.         If ret > -1 Then
  5.             rtb.SelectionColor = clr
  6.             If ret < rtb.Text.Length Then ChangeColor(word, clr, rtb, ret + 1)
  7.         End If
  8.     End Sub
  9.  
  10. 'syntax
  11. ChangeColor(txtWord.Text, Color.Blue, rtbText)

You could of course tie it to one RichTextBox or one color and cut out some of the parameters.