If i Mod 2 = 0 Then
RichTextBox1.SelColor = vbRed
RichTextBox1.SelText = "12345" & vbCrLf
i = i + 1
Else
RichTextBox1.SelColor = vbBlue
RichTextBox1.SelText = "eeeee" & vbCrLf
i = i + 1
End If
Private i As Integer
Private Sub Command1_Click()
RichTextBox1.SelStart = 65535
If i Mod 2 = 0 Then
RichTextBox1.SelText = "12345" & vbNewLine
RichTextBox1.SelColor = vbRed
i = i + 1
Else
RichTextBox1.SelText = "eeeee" & vbNewLine
RichTextBox1.SelColor = vbBlue
i = i + 1
End If
End Sub