Si une Condition est Bonne, ne pas passer à la Suite

Résolu
Dri60 Messages postés 68 Date d'inscription lundi 24 décembre 2007 Statut Membre Dernière intervention 17 novembre 2008 - 15 mars 2008 à 17:25
Dri60 Messages postés 68 Date d'inscription lundi 24 décembre 2007 Statut Membre Dernière intervention 17 novembre 2008 - 16 mars 2008 à 17:23
Bonjour, j'ai ce code :
Private

Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click   IfNot TextBox_bv1.Text = Form1.Lbl_BV1.Text Then

      MsgBox("La Base Verbale n°1 est Fausse !", MsgBoxStyle.Exclamation)

      TextBox_bv1.Text = ""

   EndIf

   IfNot TextBox_bv1.Text = "" Then MsgBox("Bravo, Vous avez retenu les 5 Verbes !", MsgBoxStyle.Information)

EndSub

Comment faire pour que si la 1e condition est Bonne, ne pas passer à la 2e ? Merci.

 Dri60

4 réponses

Lunikmarty Messages postés 55 Date d'inscription lundi 3 mars 2008 Statut Membre Dernière intervention 17 avril 2008
15 mars 2008 à 17:27
   If
Not TextBox_bv1.Text = Form1.Lbl_BV1.Text Then


      MsgBox("La Base Verbale n°1 est Fausse !", MsgBoxStyle.Exclamation)


      TextBox_bv1.Text = ""



      Exit Sub




   End
If
3
Kristof_Koder Messages postés 918 Date d'inscription vendredi 3 août 2007 Statut Membre Dernière intervention 27 octobre 2008 10
16 mars 2008 à 16:31
Ou comme ca ...
If Not TextBox_bv1.Text = Form1.Lbl_BV1.Text Then
MsgBox("La Base Verbale n°1 est Fausse !", MsgBoxStyle.Exclamation)
TextBox_bv1.Text = ""
ElseIf Not TextBox_bv1.Text = "" Then
MsgBox("Bravo, Vous avez retenu les 5 Verbes !", MsgBoxStyle.Information)
End if
3
Dri60 Messages postés 68 Date d'inscription lundi 24 décembre 2007 Statut Membre Dernière intervention 17 novembre 2008
15 mars 2008 à 17:31
Merci

 Dri60
0
Dri60 Messages postés 68 Date d'inscription lundi 24 décembre 2007 Statut Membre Dernière intervention 17 novembre 2008
16 mars 2008 à 17:23
Merci pour ton Aide

 Dri60
0
Rejoignez-nous