Private Sub TexVit_exit(ByVal cancel As MSForms.ReturnBoolean)
TexVit.Text = Format(TexVit.Text, "#""-""##""-""##""-""##""-""###""-""###")
ActiveSheet.Range("H2").Select
Do Until ActiveCell = Me.ComNom Or ActiveCell = ""
ActiveCell.Offset(1, 0).Select
Loop
If ActiveCell = Me.ComNom.Value Then
Else
ActiveSheet.Range("N2").Select
Do Until ActiveCell = Me.TexVit Or ActiveCell = ""
ActiveCell.Offset(1, 0).Select
Loop
If ActiveCell = Me.TexVit.Value Then
MsgBox " Le N° carte vitale " & ActiveCell & " Existe déjàdans la base"
Me.TexVit = ""
Me.TexVit.SetFocus
Exit Sub
End If
End If
End Sub