Okay, this is for using in something like a winsock array(it will limit the max winsocks to 300, more than enough):

VB Code:
  1. Private Sub Query()
  2.     On Error GoTo errhandler
  3. Dim I as long, MyCount as long
  4.         For i = 0 To UBound(Servers)
  5.           Doevents
  6.            MyCount = MyCount + 1
  7.              If MyCount >= 300 Then MyCount = 0
  8.                 If i > 0 And MyCount < 300 Then
  9.                    If Winsock1(MyCount - 1).Tag <> "" Then
  10.                        Load Winsock1(MyCount - 1)
  11.                    End If
  12.                 End If
  13.         With winsock(MyCount - 1)
  14.            .RemoteHost = Server.ip
  15.            .RemotePort = Server.port
  16.            .SendData "MESSAGE"
  17.         End with
  18.        Next i
  19. Exit Sub
  20. errhndler:
  21.         If Err.Number = 340 Then
  22.             Resume Next
  23.         End If