Live-Forum - Die aktuellen Beiträge
Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

Excel-Änderungsprotokoll

Forumthread: Excel-Änderungsprotokoll

Excel-Änderungsprotokoll
Max
Hallo liebes Excel - Team,
habe bei euch folgenden Beitrag gefunden:
-------------------------------------------------
Hallo Wolfgango,
Die Eingaben werden protokolliert in Tabelle3, die man ausblenden sollte.
Makros müssen aktiv sein.
Option Explicit
Dim LoLetzte As Long
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
With Worksheets("Tabelle3")
LoLetzte = IIf(IsEmpty(.Cells(.Rows.Count, 1)), .Cells(Rows.Count, 1).End(xlUp).Row, .  _
_
Rows.Count) + 1
.Cells(LoLetzte, 1) = Target.Address
.Cells(LoLetzte, 2) = Target
.Cells(LoLetzte, 3) = Sh.Name
.Cells(LoLetzte, 4) = Environ("Username")
End With
Application.EnableEvents = True
End Sub
Gruß Hajo
-------------------------------------------------

jetzt würde ich gerne in eine extra Spalte den Wert vor der Änderung hineinschreiben.
also quasi:
.Cells(LoLetzte, 1) = Target.Address
.Cells(LoLetzte, 2) = Target (="Wert neu")
.Cells(LoLetzte, 3) = Sh.Name
.Cells(LoLetzte, 4) = Environ("Username")
.Cells(LoLetzte, 5) = "Wert - alt"
danke im Vorhinein für eure hilfe.
Anzeige

1
Beitrag zum Forumthread
Beitrag zu diesem Forumthread

Betreff
Benutzer
Anzeige
AW: Excel-Änderungsprotokoll
12.04.2011 20:12:21
hary
Hallo Max
so? Code in den Code der Arbeitsmappe.

Option Explicit
Dim letzterwert
Private Sub Worksheet_Change(ByVal Target As Range)
Dim LoLetzte As Long
Application.EnableEvents = False
With Worksheets("Tabelle3")
LoLetzte = IIf(IsEmpty(.Cells(.Rows.Count, 1)), .Cells(Rows.Count, 1).End(xlUp).Row, . _
Rows.Count) + 1
.Cells(LoLetzte, 1) = Target.Address
.Cells(LoLetzte, 2) = Target
.Cells(LoLetzte, 3) = ActiveSheet.Name
.Cells(LoLetzte, 4) = Environ("Username")
.Cells(LoLetzte, 5) = letzterwert
End With
Application.EnableEvents = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
letzterwert = Target.Value
End Sub

gruss hary
Anzeige
;

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Entdecke mehr
Finde genau, was du suchst

Die erweiterte Suchfunktion hilft dir, gezielt die besten Antworten zu finden

Suche nach den besten Antworten
Unsere beliebtesten Threads

Entdecke unsere meistgeklickten Beiträge in der Google Suche

Top 100 Threads jetzt ansehen
Anzeige