habe fertig..
13.12.2005 16:18:03
UweD
Hallo
hat was länger gedauert, so klappt es bei mir..
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A:A")) Is Nothing Then
On Error GoTo Fehler
Application.EnableEvents = False
Dim c, LA&
With Columns(1)
Set c = .Find(What:=Target.Value, LookIn:=xlValues)
If Not c Is Nothing And c.Address <> Target.Address Then
'bereits vorhanden
Cells(c.Row, 4) = Format(Time, "hh:mm:ss")
Cells(c.Row, 5) = Format(Date, "DD.MM.YYYY")
Target.Value = "" 'neuen Eintrag wieder löschen
LA = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
Cells(LA + 1, 1).Select 'letze Zelle auswählen
Else
'ist neu
Cells(Target.Row, 2) = Format(Time, "hh:mm:ss")
Cells(Target.Row, 3) = Format(Date, "DD.MM.YYYY")
End If
End With
End If
Fehler:
If Err.Number <> 0 Then MsgBox "Fehler: " & Err.Number & " " & Err.Description
Application.EnableEvents = True
End Sub
gut scan :-)
Gruß UweD
(Rückmeldung wäre schön)