i have these code:
but sometimes don't works correctly:(
can anyone advice me?
Code:
If IsKeyWord(s) = True Then
RichTextBox1.SelStart = RichTextBox1.SelStart - Len(s)
RichTextBox1.SelLength = Len(s)
RichTextBox1.SelColor = vbBlue
RichTextBox1.SelLength = 0
RichTextBox1.SelColor = vbBlack
RichTextBox1.SelStart = RichTextBox1.SelStart + Len(s) + 1
RichTextBox1.SelColor = vbBlack
End If
can anyone advice me?