I have this code in button_click event
The issue at hand here is when I type in the box again and click the button it justs adds the text it doesnt insert the equivelent of vbCrlf . How can I accomplish that ?Code:Dim strRTF As String, strFontName As String, lngFontColor As Long, lngFontSize As Long Dim blnBold As Boolean, blnUnderline As Boolean, blnItalic As Boolean 'get font-styles so we can reset them later blnBold = RtbText.SelBold blnUnderline = RtbText.SelUnderline blnItalic = RtbText.SelItalic lngFontColor& = RtbText.SelColor lngFontSize& = RtbText.SelFontSize strFontName$ = RtbText.SelFontName strRTF$ = RtbText.TextRTF ''clear textbox RtbText.Text = "" ''reset font-styles RtbText.SelBold = blnBold RtbText.SelUnderline = blnUnderline RtbText.SelItalic = blnItalic RtbText.SelColor = lngFontColor& RtbText.SelFontSize = lngFontSize& RtbText.SelFontName = strFontName$ ''show bottom half of textbox rtbChat.SelStart = Len(rtbChat.Text) rtbChat.SelLength = 0 'print text in our rtbChat rtbChat.SelRTF = vbCrLf & strRTF$ Debug.Print strRTF$ 'scroll rtbChat down rtbChat.SelStart = Len(rtbChat.Text) rtbChat.SelLength = 0 'set focus RtbText.SetFocus
Thanks for having a look ,
[]Private[]




Reply With Quote