Private Sub txtdar_Change()
Dim Valeur As Byte
Dim D As Date
txtdar.MaxLength = 8 'nb caracteres maxi dans textbox
Valeur = Len(txtdar)
If Valeur = 2 Or Valeur = 5 Then txtdar = txtdar & "/"
If Len(txtdar.Text) >= 8 Then
If Not IsDate(Me.txtdar.Value) Then
Me.txtdar.Text = ""
Me.txtdar.SetFocus
Exit Sub
End If
txthar.SetFocus
End If
End Sub