Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) ' Vérifie la sélection de lignes adequates.(4 à 17 et 20 à 30) et met le numero de ligne dans NrLigEnc
If TextBox1 >= 4 And TextBox1 <= 17 Or TextBox1 >= 20 And TextBox1 <= 30 Then
NrLigEnc = TextBox1
Else
TextBox1 = ""
message = "Saisir un nombre compris de 4 à 17 ou de 20 à 30 !"
Set ctrl = TextBox1
Application.OnTime 1, "Quitter_TextBox"
End If
End Sub
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If flag Or TextBox2 <> "" Then Exit Sub
message = "Saisir avant de quitter Textbox2"
Set ctrl = TextBox2
Application.OnTime 1, "Quitter_TextBox"
End Sub
Private Sub TextBox3_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If flag Or TextBox3 <> "" Then Exit Sub
message = "Saisir la dénomination de la valeur"
Set ctrl = TextBox3
Application.OnTime 1, "Quitter_TextBox"
End Sub