Bonjour,
Je souhaiterais contrôler la saisie de plusieurs TextBox et ComboBox, excepté une seule en particulier que j'ai nommé "ComboBoxFiche"
J'utilise ce code :
Quelqu'un pourrait-il m'aider ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 Private Sub btnajout_Click() Dim ctrl As Control, Verif As Boolean For Each ctrl In Me.Controls If TypeOf ctrl Is MSForms.TextBox Or TypeOf ctrl Is MSForms.ComboBox Then If ctrl.Value = "" Then Verif = True End If Next If Verif = True Then MsgBox "Tous les champs doivent être complétés ! ", vbExclamation, "Oups !"
Un grand merci par avance
Partager