Option Explicit Public Sub Form_Load() Label1.Caption = "Customer Names" Label2.Caption = "Not Connected" List1.AddItem ("Empty...") Command1.Caption = "List Customers" End Sub Private Sub Form_OKClick() App.End End Sub Private Sub Command1_Click() WinSock1.RemoteHost = "EDOCSERVER" WinSock1.RemotePort = 5090 WinSock1.Connect Label1.Caption = "Connected to S104WMRM" End Sub Private Sub Winsock1_Connect() WinSock1.SendData "Customer" End Sub Private Sub WinSock1_DataArrival(ByVal bytesTotal As Long) Dim IncomingData Dim LastPosFound Dim AtFoundPos Dim FieldCounter If bytesTotal > 0 Then WinSock1.GetData IncomingData, vbString, 500 LastPosFound = 1 AtFoundPos = 1 FieldCounter = 1 ' Clear the list for the first time through... List1.Clear While AtFoundPos <> 0 AtFoundPos = InStr(AtFoundPos, IncomingData, ":") If AtFoundPos > 0 Then AtFoundPos = AtFoundPos + 1 List1.AddItem (Mid(IncomingData, LastPosFound, ((AtFoundPos - LastPosFound) - 1))) LastPosFound = AtFoundPos FieldCounter = FieldCounter + 1 End If Wend End If End Sub