Bonjour a tous, 
je me prenomme ronny et j'ai crée une application avec le code VBA
Oups ! Quelque chose ne va pas ne va pas a mon code, je ne sais veritablement lequel.
Mon probleme est que j'ai un message "Le mot de passe doit contenir 6 carrectères au minimum" dans MsgBox qui se repecte apres la verification
la question que me me pose es que j'ai mal place le code ou j'ai oublié un element
bref voici le code :
j'ai veritablement besoin d'une solution
Private Sub Cmd_ajouter_Click()
	
	
	
	
	
		
	
		
			
		
		
	
				
			je me prenomme ronny et j'ai crée une application avec le code VBA
Oups ! Quelque chose ne va pas ne va pas a mon code, je ne sais veritablement lequel.
Mon probleme est que j'ai un message "Le mot de passe doit contenir 6 carrectères au minimum" dans MsgBox qui se repecte apres la verification
la question que me me pose es que j'ai mal place le code ou j'ai oublié un element
bref voici le code :
j'ai veritablement besoin d'une solution
Private Sub Cmd_ajouter_Click()
		VB:
	
	
	Private Sub Cmd_ajouter_Click()
On Error Resume Next
'declarer nos variable
Dim DL As Integer
Sheets("BASE_PARAMETRE").Activate
'If MsgBox("Confirmez-vous l'insertion de ce nouveau contact ?", vbYesNo, "Demande de confirmation d'ajout") = vbYes Then
If Txt_Nom = "" Then
MsgBox "Veuillez saisir le NOM ", vbCritical, "Attention"
Exit Sub
End If
If Txt_Prenom = "" Then
MsgBox "Veuillez saisir le PRENOM(S)", vbCritical, "Attention"
Exit Sub
End If
If Txt_DateNaissance = "" Then
MsgBox "Veuillez saisir LA DATE DE NAISSANCE", vbCritical, "Attention"
Exit Sub
End If
If Me.CboBox = "" Then
MsgBox "Veuillez préciser le SEXE", vbCritical, "Attention"
Exit Sub
End If
If Cb_nationalit = "" Then
MsgBox "veuillez saisir la NATIONALITE", vbCritical, "Attention"
Exit Sub
End If
If Stature = "" Then
MsgBox "veuillez CHOISIR LE STATUR", vbCritical, "Attention"
Exit Sub
End If
If Txt_USER < 8 Then
MsgBox "veuillez SAISIR LE NOM D'UTULISATEUR", vbCritical, "Attention"
Exit Sub
End If
If Me.Passebox1 = "" Then
MsgBox "veuillez saisir le MOT DE PASSE", vbCritical, "Attention"
Exit Sub
End If
If Me.Passebox2 = "" Then
MsgBox "veuillez CONFIRMER LE MOT DE PASSE", vbCritical, "Attention"
Exit Sub
End If
If Cb_nationalit = "" Then
MsgBox "Veuillez préciser L'OBJET DE LA VISITE", vbCritical, "Attention"
Exit Sub
End If
If Txt_Code = "" Then
MsgBox "Veuillez saisir le CODE DU VISITEUR ", vbCritical, "Attention"
Exit Sub
End If
                        If Passbax1.TextLength < 6 Then
                            MsgBox "Le mot de passe doit contenir 6 carrectères au minimum"
                            Passbox1 = ""
                            Passebox2 = ""
                            
                        ElseIf Passbox1 <> passbox2 Then
                            MsgBox "Le mot de passe saisir est différengt!"
                            Passbox1 = ""
                            Passebox2 = ""
                        End If
                        If Me.Txt_Code <> "" Then
                        If Me.Txt_Nom <> "" Then
                        If Me.Txt_Prenom <> "" Then
                        If Me.CboBox <> "" Then
                        If Me.Txt_DateNaissance <> "" Then
                        If Me.Txt_LieuNaissance <> "" Then
                        If Me.Cb_nationalit <> "" Then
                        If Me.Txt_USER <> "" Then
                        If Me.Stature <> "" Then
                        If Me.Passebox2 <> "" Then
                        If Me.Txt_Date <> "" Then
                        If Me.Heure_reel <> "" Then
              
              If MsgBox("voulez-vous ajouter les information?", vbYesNo) = vbYes Then
                
                  'ajouter une nouvelle ligne à notre tableau
                   Sheets("BASE_PARAMETRE").ListObjects(1).ListRows.Add
                   'recherche la dernière ligne
                   DL = Sheets("BASE_PARAMETRE").Range("C506532").End(xlUp).Row
                  
                   'ajouter les informations dans la base de données
                  
                   Sheets("BASE_PARAMETRE").Range("A" & DL) = Sheets("BASE_COMMERCIAL").Range("Y1") '.....................numero Id
                  
                  
                   Sheets("BASE_PARAMETRE").Range("B" & DL) = Me.Txt_Code
                   Sheets("BASE_PARAMETRE").Range("C" & DL) = Me.Txt_USER
                   Sheets("BASE_PARAMETRE").Range("D" & DL) = Me.Passebox2
                  
                   Sheets("BASE_PARAMETRE").Range("P" & DL) = Me.Txt_Nom
                   Sheets("BASE_PARAMETRE").Range("Q" & DL) = Me.Txt_Prenom
                  
                   Sheets("BASE_PARAMETRE").Range("R" & DL) = Me.Txt_DateNaissance
                   Sheets("BASE_PARAMETRE").Range("S" & DL) = Me.Txt_LieuNaissance
                   Sheets("BASE_PARAMETRE").Range("T" & DL) = Me.CboBox
                   Sheets("BASE_PARAMETRE").Range("U" & DL) = Me.Cb_nationalit
                  
                  
                   Sheets("BASE_PARAMETRE").Range("V" & DL) = Me.Stature
                  
                   Sheets("BASE_PARAMETRE").Range("W" & DL) = Me.Txt_Date
                   Sheets("BASE_PARAMETRE").Range("X" & DL) = Me.Heure_reel
                  
                  
                   'Incrementer le numero ID
                    Sheets("BASE_PARAMETRE").Range("Y1") = Sheets("BASE_COMMERCIAL").Range("Y1") + 1
                                                                                                                                        
                        Me.Txt_Code = Empty
                        Me.Txt_Nom = Empty
                        Me.Txt_Prenom = Empty
                        Me.CboBox = Empty
                        Me.Txt_DateNaissance = Empty
                        
                        Me.Txt_LieuNaissance = Empty
                        Me.Cb_nationalit = Empty
                        Me.Txt_USER = Empty
                        Me.Stature = Empty
                        Me.Passebox2 = Empty
                        Me.Txt_Date = Empty
                        Me.Heure_reel = Empty
                    
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End Sub