Excel vba valider si textbox non vides
Résolu/Fermé
lulu37
Messages postés
76
Date d'inscription
jeudi 24 août 2006
Statut
Membre
Dernière intervention
8 avril 2016
-
28 août 2006 à 12:17
lulu37 Messages postés 76 Date d'inscription jeudi 24 août 2006 Statut Membre Dernière intervention 8 avril 2016 - 28 août 2006 à 13:13
lulu37 Messages postés 76 Date d'inscription jeudi 24 août 2006 Statut Membre Dernière intervention 8 avril 2016 - 28 août 2006 à 13:13
A voir également:
- Excel vba valider si textbox non vides
- Si et excel - Guide
- Liste déroulante excel - Guide
- Excel cellule couleur si condition texte - Guide
- Word et excel gratuit - Guide
- Déplacer une colonne excel - Guide
4 réponses
ccmnino
Messages postés
188
Date d'inscription
samedi 20 mai 2006
Statut
Contributeur
Dernière intervention
27 août 2010
52
28 août 2006 à 12:26
28 août 2006 à 12:26
Salut!
-Modifier ton code comme ça , ajoute "Dim rien" et remplace:
Private Sub OK_Click()
Dim rien
'controle saisie des 3 criteres d identification'
If ListBoxService = rien Then
MsgBox "Vous devez renseigner les 3 critères d'identification.", 0, "Information"
End If
If TextBoxNom = rien Then
MsgBox "Vous devez renseigner les 3 critères d'identification.", 0, "Information"
End If
If TextBoxPrenom = rien Then
MsgBox "Vous devez renseigner les 3 critères d'identification.", 0, "Information"
End If
A+
-Modifier ton code comme ça , ajoute "Dim rien" et remplace:
Private Sub OK_Click()
Dim rien
'controle saisie des 3 criteres d identification'
If ListBoxService = rien Then
MsgBox "Vous devez renseigner les 3 critères d'identification.", 0, "Information"
End If
If TextBoxNom = rien Then
MsgBox "Vous devez renseigner les 3 critères d'identification.", 0, "Information"
End If
If TextBoxPrenom = rien Then
MsgBox "Vous devez renseigner les 3 critères d'identification.", 0, "Information"
End If
A+
ccmnino
Messages postés
188
Date d'inscription
samedi 20 mai 2006
Statut
Contributeur
Dernière intervention
27 août 2010
52
28 août 2006 à 13:06
28 août 2006 à 13:06
Salut!
moi je utilise vb6 et non vb for office peut-étre ça:
-Essai ça:
Private Sub OK_Click()
Dim rien
'controle saisie des 3 criteres d identification'
If ListBoxService = rien Then
MsgBox "Vous devez renseigner les 3 critères d'identification.", 0, "Information"
Exit sub
End If
If TextBoxNom = rien Then
MsgBox "Vous devez renseigner les 3 critères d'identification.", 0, "Information"
Exit sub
End If
If TextBoxPrenom = rien Then
MsgBox "Vous devez renseigner les 3 critères d'identification.", 0, "Information"
Exit sub
End If
moi je utilise vb6 et non vb for office peut-étre ça:
-Essai ça:
Private Sub OK_Click()
Dim rien
'controle saisie des 3 criteres d identification'
If ListBoxService = rien Then
MsgBox "Vous devez renseigner les 3 critères d'identification.", 0, "Information"
Exit sub
End If
If TextBoxNom = rien Then
MsgBox "Vous devez renseigner les 3 critères d'identification.", 0, "Information"
Exit sub
End If
If TextBoxPrenom = rien Then
MsgBox "Vous devez renseigner les 3 critères d'identification.", 0, "Information"
Exit sub
End If
lulu37
Messages postés
76
Date d'inscription
jeudi 24 août 2006
Statut
Membre
Dernière intervention
8 avril 2016
13
28 août 2006 à 12:34
28 août 2006 à 12:34
ca n'arrete pas pour autant la macro ...
?
?
lulu37
Messages postés
76
Date d'inscription
jeudi 24 août 2006
Statut
Membre
Dernière intervention
8 avril 2016
13
28 août 2006 à 13:13
28 août 2006 à 13:13
Exit Sub
Le détail qui fait toute la différence !
Merci beaucoup ccmnino
Le détail qui fait toute la différence !
Merci beaucoup ccmnino