Private Sub TextBox1_Change()
Dim Txt
    Txt = TextBox1.Text
    If Txt = "" Then Exit Sub
    If IsNumeric(Txt) = False Then
       GoTo ErrorHandler
    If Len(Txt) = 6 Then
        Txt = DateSerial(Right(Txt, 2), _
              Mid(Txt, 3, 2), Left(Txt, 2))
        If Not IsDate(Txt) Then
            GoTo ErrorHandler
        Else
            TextBox1.Text = ""
            MsgBox "Datum: " & Txt
            Exit Sub
        End If
    End If
    Exit Sub
ErrorHandler:
    Beep
    MsgBox "Kein Datum!", vbCritical
    TextBox1.Text = ""
End Sub

