Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Len(TextBox1) > 0 Then
If IsDate(TextBox1) Then
TextBox1 = Format(TextBox1, "dddd dd mmmm yyyy")
Else
MsgBox "Merci d'entrer une date valide!", vbCritical + vbOKOnly, "ERREUR"
Cancel = True
End If
End If
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox1 Like "##-##-####" And IsDate(TextBox1) Then
TextBox1 = Format(TextBox1, "dddd d mmmm yyyy")
Else
Cancel = True
TextBox1 = ""
End If
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsDate(TextBox1) Then
TextBox1 = Format(TextBox1, "dddd d mmmm yyyy")
Else
Cancel = True
TextBox1 = ""
End If
End Sub