Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click For Each c As Control In Me.Controls If c.GetType Is GetType(TextBox) Then c.Text = "ceci est la TextBox nommée " & c.Name MessageBox.Show(c.Name & Environment.NewLine & c.Text) Select Case c.Name Case "TextBox" & 2 To "TextBox" & 4 c.Text = Nothing End Select MessageBox.Show(c.Name & Environment.NewLine & c.Text) End If Next MessageBox.Show("Reset des textboxes") For Each c As Control In Me.Controls If c.GetType Is GetType(TextBox) Then c.Text = Nothing End If Next End Sub
For Each c As Control In grpAReseter If c.GetType Is GetType(TextBox) Then
For Each c As Control In Me.Controls If c.GetType Is GetType(TextBox) And c.Tag = "A reseter" Then
For Each c As Control In Me.Controls If c.GetType Is GetType(TextBox) And c.Name.Contains("Client") Then