Änderungen protokollieren
18.11.2013 15:59:45
MasterEytukan
habe einen älteren Beitrag gefunden der mir sehr geholfen hat.
(Geschrieben am: 16.01.2013 14:05:28; von: Hajo_zi)
Folgendes ist bei mir anders. Meine Protokolldatei ist Schreibgeschützt mit Passwort.
Kann ich das im Code einbinden?
Option Explicit
Dim LoLetzte As Long
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
With Worksheets("Protokoll")
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")
.Cells(LoLetzte, 5) = Format(Now, "dd-mmm-yyyy ddd. hh:mm:ss") & " Uhr"
End With
Application.EnableEvents = True
End Sub