ich hab vor, eine History in einer Tabelle einzurichten.
Allerdings zeichnet der Code nur Werteänderungen in Zellen auf und nicht Formel und/oder Formatierungsänderungen.
Weiß da jemand von euch Rat!
Mfg
Albert
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Dim Netzwerk As Object
Set Netzwerk = CreateObject("wscript.network")
With Worksheets("History")
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) = CStr(Date)
.Cells(LoLetzte, 6) = CStr(Time)
.Cells(LoLetzte, 7) = Netzwerk.computername
.Cells(LoLetzte, 8) = Netzwerk.UserName
End With
Application.EnableEvents = True
End Sub
Target zeigt mir nur den geänderten Wert, Nicht was davor in der Zelle stand.