Private Sub Valider_Click()
If IsDate(TextBox1.Value) And Mid(TextBox1, 2, 2) > "00" And Mid(TextBox1, 4, 2) <= 12 Then
Cells(1, 1).Value = Format(UCase(TextBox1.Value), "dd/mm/yyyy")
Unload Me
Else
MsgBox "Date invalide", vbCritical, "Erreur date"
TextBox1 = ""
TextBox1.SetFocus
End If