Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Anzeige
Inhaltsverzeichnis

Automatic last update

Forumthread: Automatic last update

Automatic last update
24.08.2004 18:26:41
Corinne
Habe folgenden Code. Das Ziel ist, bei jeder Änderung innerhalb von A3:AB3 (resp A4:AB4,...) das aktuelle Datum in AC3 (AC4,...) zu haben. Wie kann man das lösen?
Gruss
Co
Set Target = Application.Intersect(Target, Range("A3:AB4"))
'If not within the range, the sub is being left
If Target Is Nothing Then Exit Sub
' Activates error handling
On Error GoTo ErrorHandler
'Turns of events to avoid re-update
Application.EnableEvents = False
' sets the zone where the date should be entered
Target.Offset(0, 25) = Now

Anzeige

1
Beitrag zum Forumthread
Beitrag zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: Automatic last update
25.08.2004 10:53:26
Harald
Hallo Corinne,
zufällig auf den Thread gestossen und hab hier eine -auf die Schnelle- umgebaute Lösung von Hajo anzubieten.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim RaBereich As Range, RaZelle As Range
Set RaBereich = Range("A3:AB3")
Application.EnableEvents = False
For Each RaZelle In Range(Target.Address)
If Not Intersect(RaZelle, RaBereich) Is Nothing Then Range("AC3") = Date
Next RaZelle
Application.EnableEvents = True
Set RaBereich = Nothing
End Sub

Gruß
Harald
Anzeige
Anzeige
Anzeige
Live-Forum - Die aktuellen Beiträge
Datum
Titel
14.05.2026 13:31:09
14.05.2026 09:50:42
13.05.2026 19:14:18