I have the following code to clean the controls of a form, these were grouped by GroupBox
and before it worked perfectly, now I had to add a panel to control my form better and this code already Do not you do the task I require, any suggestions?
Public Sub limpiarControles()
Dim ctrl As Control
Dim ctrlHijo As Control
For Each ctrl In Me.Controls
If TypeOf ctrl Is TextBox Then
ctrl.Text = ""
ElseIf ctrl.HasChildren Then
For Each ctrlHijo In ctrl.Controls
If TypeOf ctrlHijo Is TextBox Then
ctrlHijo.Text = ""
End If
Next
End If
Next