
Originally Posted by
quijotemx
I don't get the following code perform correctly:
Is this any better?
Code:
Private Sub AppendText(RTB As RichTextBox, _
fontN As String, _
fontS As Integer, _
fontI As Boolean, _
fontU As Boolean, _
fontB As Boolean, _
NewText As String, _
Optional TextColor As Long = vbBlack)
With RTB
.SelStart = Len(.Text)
.SelColor = TextColor
.SelBold = fontB
.SelItalic = fontI
.SelUnderline = fontU
.SelFontName = fontN
.SelFontSize = fontS
.SelText = vbCrLf & NewText
End With
End Sub