VB变量未定义
Option ExplicitPublic SockIndex As Integer
Public Sub FindFreeSocket()
SockIndex = 200
Dim i
'遍历控件
For i = 0 To Socket.UBound--------------------------------------此行出错
If Socket(i).State = 0 Then SockIndex = i
Next
If SockIndex = 200 Then
Load Socket(Socket.UBound + 1)
SockIndex = Socket.UBound
End If
End Sub