Private Sub txtDate_Change()
Dim sDate As String
sDate = txtDate.Text
If sDate = "" Then Exit Sub
If Not Right(sDate, 1) Like "[0-9]" Then
sDate = Left(sDate, Len(sDate) - 1)
txtDate.Text = sDate
End If
If Len(sDate) = 6 Then
sDate = Format(DateSerial( _
"20" & Right(sDate, 2), _
Mid(sDate, 3, 2), _
Left(sDate, 2) _
), "dd.mm.yy")
txtDate.Text = sDate
End If
End Sub