Couldn't find an answer really,

How can i not lose my formatting when i alter the richtextbox ?


VB Code:
  1. For i = 1 To Len(strData)
  2.         RichTextBox1.SelStart = Len(RichTextBox1.Text)
  3.         RichTextBox1.SelLength = 0
  4.         If Mid(strData, i, 1) = Chr(2) Then
  5.             'BoldOn = Not BoldOn
  6.             RichTextBox1.SelBold = Not RichTextBox1.SelBold
  7.             'Debug.Print "BOLD " & CStr(BoldOn) & ParseData.strBody
  8.         Else
  9.             RichTextBox1.SelText = Mid(strData, i, 1)
  10.         End If
  11.     Next

It bolds the correct data, then subsequent data is correctly bolded, whilst the current stuff loses its formatting

How can i prevent this?