I don't get the following code perform correctly:
vb Code:
Private Sub text2ADDText(xText As RichTextBox, fontN As String, fontS As Integer, fontI As Boolean, fontU As Boolean, fontB As Boolean, txt As String) Dim text2Len As Long text2Len = Len(xText.Text) xText.Text = xText.Text & vbCr & vbLf & txt xText.SelStart = text2Len + 2 xText.SelLength = Len(txt) xText.SelBold = fontB xText.SelUnderline = fontU xText.SelFontName = fontN xText.SelFontSize = fontS End Sub
It only produces the desired result in the last line added to the control invoking the sub.
Could you help me ...
El quijoteMx




Reply With Quote