Option Explicit Private Sub sckBot_Close() End End Sub Private Sub sckBot_Connect() bSockSetUp = True End Sub Private Sub sckBot_DataArrival(ByVal bytesTotal As Long) Dim sData$, sBuffer$() Dim i% 'Call sckBot.PeekData(sData, vbString) If sckBot.State = sckConnected Then Call sckBot.GetData(sData, vbString) sBuffer = Split(sData, vbCrLf) For i = 0 To UBound(sBuffer) Call ServerIn(sBuffer(i)) Next Erase sBuffer End If End Sub Private Sub sckBot_Error(ByVal Number As Integer, Description As String, ByVal SCode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean) With lpSockLastError .Number = Number .Description = Description .SCode = SCode .Source = Source .HelpFile = HelpFile .HelpContext = HelpContext End With CancelDisplay = True End Sub