Boucle textbox qui ne se suivent pas
Résolu
eideal
Messages postés
20
Date d'inscription
Statut
Membre
Dernière intervention
-
eideal Messages postés 20 Date d'inscription Statut Membre Dernière intervention -
eideal Messages postés 20 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
J'aimerais savoir si il est possible de faire une boucle sur des textbox qui ne se suivent pas?
J'ai essayé avec Controls("Textbox" & i) mais je ne sais pas comment faire pour passer du textbox 2 au 6 puis au10, ...
Voici mon code :
If TextBox2.Value < TextBox5.Value Then
MsgBox "Votre stock Tampon est superieur à Stock !", vbExclamation, "ATTENTION"
Exit Sub
End If
If TextBox6.Value < TextBox9.Value Then
MsgBox "Votre stock Tampon est superieur à Stock !", vbExclamation, "ATTENTION"
Exit Sub
End If
If TextBox10.Value < TextBox13.Value Then
MsgBox "Votre stock Tampon est superieur à Stock !", vbExclamation, "ATTENTION"
Exit Sub
End If
If TextBox14.Value < TextBox17.Value Then
MsgBox "Votre stock Tampon est superieur à Stock !", vbExclamation, "ATTENTION"
Exit Sub
End If
If TextBox18.Value < TextBox21.Value Then
MsgBox "Votre stock Tampon est superieur à Stock !", vbExclamation, "ATTENTION"
Exit Sub
End If
If TextBox22.Value < TextBox25.Value Then
MsgBox "Votre stock Tampon est superieur à Stock !", vbExclamation, "ATTENTION"
Exit Sub
End If
Merci pour vos retours
J'aimerais savoir si il est possible de faire une boucle sur des textbox qui ne se suivent pas?
J'ai essayé avec Controls("Textbox" & i) mais je ne sais pas comment faire pour passer du textbox 2 au 6 puis au10, ...
Voici mon code :
If TextBox2.Value < TextBox5.Value Then
MsgBox "Votre stock Tampon est superieur à Stock !", vbExclamation, "ATTENTION"
Exit Sub
End If
If TextBox6.Value < TextBox9.Value Then
MsgBox "Votre stock Tampon est superieur à Stock !", vbExclamation, "ATTENTION"
Exit Sub
End If
If TextBox10.Value < TextBox13.Value Then
MsgBox "Votre stock Tampon est superieur à Stock !", vbExclamation, "ATTENTION"
Exit Sub
End If
If TextBox14.Value < TextBox17.Value Then
MsgBox "Votre stock Tampon est superieur à Stock !", vbExclamation, "ATTENTION"
Exit Sub
End If
If TextBox18.Value < TextBox21.Value Then
MsgBox "Votre stock Tampon est superieur à Stock !", vbExclamation, "ATTENTION"
Exit Sub
End If
If TextBox22.Value < TextBox25.Value Then
MsgBox "Votre stock Tampon est superieur à Stock !", vbExclamation, "ATTENTION"
Exit Sub
End If
Merci pour vos retours
merci pour ce retour