protokollierung
Stephan
ich protokolliere wie folgt Änderungen in einer Spalte:
'-----------------------------------------------------------------------------------
'Dokumentation der im Blatt gemachten Änderungen
'-----------------------------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Zeile As Long
If Not Application.Intersect(Target, Range("G9:G39")) Is Nothing Then
With Sheets(14)
Sheets(14).Unprotect Password:="abfall" 'Schutz aufheben
Zeile = .Cells(65536, 1).End(xlUp).Row + 1
.Cells(Zeile, 1) = Target.Address(False, False) 'Welche Zelle?
.Cells(Zeile, 2) = Cells(Target.Row, Target.Column) 'Welcher Inhalt?
.Cells(Zeile, 3) = Format(Date, "dd.mm.yyyy") 'Wann?
.Cells(Zeile, 4) = Format(Time, "hh:mm:ss") 'Wann?
.Cells(Zeile, 5) = Application.UserName 'Wer?
End With
End If
Sheets(14).Protect Password:="abfall", DrawingObjects:=True, Contents:=True, Scenarios:= _
True
End Sub
Nun möchte ich die Angaben noch um den Namen des sheets ergänzen, da ich in der Datei mehrere sheets verwenden möchte. Wer kann mir da helfen?