visual basic code:--------------------------------------------------------------------------------
Winsock1.Close(Index)

What is this??

When i run this codes

visual basic code:--------------------------------------------------------------------------------
Dim i as Integer
Dim OnlineUsers as Integer

For i = 1 to Winsock1.UBound
If Winsock1(i).State = sckConnected Then
OnlineUsers = OnlineUsers + 1
End If
Next i

Label1.Caption = "There are currently: " & OnlineUsers & " computers connected."
---------------------------------------------------------------------------

It come out compile error method or data not found Please advise me.. I used it like this Private Sub sckControlPanel_Close()
If sckControlPanel.State <> sckNotConnected Then

StatusBar1.Panels(1).Text = "Not Connected "

End If

Dim i As Integer
Dim OnlineUsers As Integer

For i = 1 To sckControlPanel.UBound(ServerList.List)
If sckControlPanel(i).State = sckConnected Then
OnlineUsers = OnlineUsers + 1
End If
Next i

Label5.Caption = "There are currently: " & OnlineUsers & " computers connected."

End Sub