hi..
i have a winsock control array with index's say 0,1,4,6,etc...
i want to knw how to loop through all the control arrays of dat control...
pls help!
Printable View
hi..
i have a winsock control array with index's say 0,1,4,6,etc...
i want to knw how to loop through all the control arrays of dat control...
pls help!
Are the indexes in sequence? I.O.W. Sequentially from 0 to 6?Quote:
Originally Posted by prophecy
If that is the case you could use a For loop
VB Code:
Dim I As Integer For I = 0 To 6 'do whatever Next I
You can do it like this.
VB Code:
Private Sub Command1_Click() For Each cont In Controls If cont.Name = "WinsockX" Then '<-- Replace with your control name ''whatever you want to do MsgBox cont.Name & cont.Index End If Next End Sub