Private Sub TextBox1_AfterUpdate()
Dim C As Range
If TextBox1 = "" Then Exit Sub
Set C = Columns(1).Find(Val(Right(TextBox1, 4)))
If C Is Nothing Then Exit Sub
If Cells(C.Row, 2).Value <> "" Then
MsgBox "Ce numéro de facture est déjà utilisé !", vbCritical, "Attention"
TextBox1.BackColor = &H8000000A
If MsgBox("nn le garde ?", vbYesNo, "Maintenant,") = vbNo Then
TextBox1 = ""
TextBox1.BackColor = &H8000000F
Exit Sub
End If
End If
End Sub