I am using a RichTextBox Control,

I want to make a function That Receives String, Color and RichTextBox (obj), then the function will Color all instances of the String that the function Receives.

I tried to make this function but I got a bad Results.

My function head is : 

**Public Sub ColorWord(ByVal T As RichTextBox, ByVal Word As String, ByVal color1 As Color)**

For example : 

```
            RichTextBox1.text = xxxxxtextxxxxxtextxxx

            After Runing the function like this :
            ColorWord(RichTextBox1,"text",Color.red)

```

The result should be :

xxxxx**text**xxxxx**text**xxx