Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
1208to1212
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

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.

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

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige