bonjour l'équipe.
je voudrais savoir si il y a un moyen de réécrire ce code qui boucle sur tous objets du formulaire.
mon code marche très bien mais y'a t'il une autre écriture? merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 For Each ctrl As Control In Me.Controls If TypeOf ctrl Is TextBox Then ctrl.Text = "" End If Next For Each ctrls As Control In Me.Controls If TypeOf ctrls Is ComboBox Then ctrls.Text = "" End If Next
j'ai voulu écrire ce code suivant mais la manière dont je raisonne ne concorde pas avec le code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 For Each ctrl As Control In Me.Controls If TypeOf ctrl Is TextBox and combobox Then ctrl.Text = "" End If Next
Partager