Try:
_______________________________________
Dim ctrl As Control
For Each ctrl In Me.Controls
If (ctrl.GetType.ToString = "System.Windows.Forms.TextBox") Then
CType(ctrl, TextBox).Text = "All textbox text is the same."
End If
Next
________________________________________
This should get you on the right track. Modify it according to what exactly you want. With this you don't need the number, it just looks to see if the control is a textbox.
The above example is for the entire form, but you can do this for panels, groupboxes, etc., anything that is a container.
J
|