Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Forms.RadioButtonA.Checked Then TextBox1.Text += ("A") Dim pattern As String = "A" Dim matches = System.Text.RegularExpressions.Regex.Matches(TextBox1.Text, pattern) For Each match As System.Text.RegularExpressions.Match In matches Dim start As Integer = match.Index Dim length As Integer = match.Length TextBox1.Select(start, length) TextBox1.SelectionColor = Color.Red Next End If End Sub