1 2 3 4 5 6 7 8 9
Private Sub ClearAllTextboxes() For i As Integer = 0 To Me.Controls.Count - 1 Dim TextboxControl As Control = New Control(CStr(i)) TextboxControl = Me.Controls(i) If TypeOf TextboxControl Is TextBox Then TextboxControl.Text = "" End If Next End Sub
For Each C As Control In Me.Controls If TypeOf C Is TextBox Then C.Text = "" End IfNext