Private Sub txtdar_Change()
Select Case Len(txtdar.Text)
Case 2, 5
txtdar.Text = txtdar.Text & "/"
Case 10
If Not (IsDate(txtdar.Value)) Then
MsgBox "Date incorrecte ! Entrez la date sous la forme jj/mm/aaaa": txtdar.Value = ""
Else
txthar.SetFocus
End If
End Select
End Sub