Datum in Zelle
15.06.2006 09:06:49
Erich
Mit diesem Code möchte ich das Datum
in Tabelle1 eintragen.
Leider kommt nur Text dabei raus.
Private Sub cmdEintragen_Click()
On Error Resume Next
Dim i As Date
i = frm_Eingabe.txtEin_1.Value
Tabelle1.Range("C2").Value = i
i = frm_Eingabe.txtAus_1.Value
Tabelle1.Range("d2").Value = i
End Sub
Mit CDBL(txtEin_1) kommt kein Eintrag
Mit folgenden Code lösche ich die Zeilen mit älteren Datum
Public Sub Datum()
Dim c As Range
Application.ScreenUpdating = False
For Each c In Range("d2:D5")
If c.Value c.EntireRow.ClearContents
End If
Next c
Application.ScreenUpdating = True
End Sub
Wenn ich das Datum direkt eingebe klappt alles.
Was mache ich falsch.
Gruss Erich