I predict a problem with your code (I might be wrong).
The boolean should be Static...
Or Global...Code:Private Sub Chat_Change() Static TextChange as Boolean If TextChange = True Then Chat.Text = Chat.Text & vbNewLine 'Auto Scroll Chat.SelStart = Len(Chat.Text) TextChange = False End If End Sub
ExcalibursZone is also right. However, if you take the lineCode:Option Explicit Private TextChange as Boolean Private Sub Chat_Change() If TextChange = True Then Chat.Text = Chat.Text & vbNewLine 'Auto Scroll Chat.SelStart = Len(Chat.Text) TextChange = False End If End Sub
out, you will have to add a line break before adding the next person's chat text.Code:Chat.Text = Chat.Text & vbNewLine




Reply With Quote