Vider toutes les TextBox et ComboBox
Bonsoir au forum,
Dans le code ci-dessous, je vide toutes les TextBox et ComboBox mais certaines restent remplies, pourquoi ?
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
Private Sub CommandButton3_Click()
Dim objControl As Control, objControl2 As Control
For Each objControl In UserForm1.Controls
If TypeOf objControl Is msforms.TextBox Then
objControl.Text = ""
End If
Next
For Each objControl2 In UserForm1.Controls
If TypeOf objControl2 Is msforms.ComboBox Then
objControl2.Text = ""
End If
Next
End Sub |
Merci d'avance
Stephanie