Hi,
The below code is from another thread and works wonderfully well, is there anyway to add extra code to enable full tracking of what actual change that was made was. At the moment it only tracks the user, sheet, cell number, the time and date.
Thanks in advance.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim Ar As Range
Dim LogSht As Worksheet
Dim LogUserHdr As Range
Dim Cel As Range
Dim Astr As String
Select Case Sh.Name
Case "Quotes", "Test"
Set LogSht = ThisWorkbook.Worksheets("Log")
Set LogUserHdr = LogSht.Range("LogUserHdr")
Set Cel = LogSht.Cells(LogSht.Rows.Count, LogUserHdr.Column).End(xlUp).Offset(1, 0)
Cel.Value = Application.UserName 'Username
Cel.Offset(0, 1).Value = Sh.Name 'sheet name
Cel.Offset(0, 3).Value = Now() 'Date / Time
For Each Ar In Target.Areas
If Len(Astr) > 0 Then
Astr = Astr & ", " & Ar.Address
Else
Astr = Ar.Address
End If
Next Ar
Cel.Offset(0, 2).Value = Astr
End Select
End Sub
The below code is from another thread and works wonderfully well, is there anyway to add extra code to enable full tracking of what actual change that was made was. At the moment it only tracks the user, sheet, cell number, the time and date.
Thanks in advance.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim Ar As Range
Dim LogSht As Worksheet
Dim LogUserHdr As Range
Dim Cel As Range
Dim Astr As String
Select Case Sh.Name
Case "Quotes", "Test"
Set LogSht = ThisWorkbook.Worksheets("Log")
Set LogUserHdr = LogSht.Range("LogUserHdr")
Set Cel = LogSht.Cells(LogSht.Rows.Count, LogUserHdr.Column).End(xlUp).Offset(1, 0)
Cel.Value = Application.UserName 'Username
Cel.Offset(0, 1).Value = Sh.Name 'sheet name
Cel.Offset(0, 3).Value = Now() 'Date / Time
For Each Ar In Target.Areas
If Len(Astr) > 0 Then
Astr = Astr & ", " & Ar.Address
Else
Astr = Ar.Address
End If
Next Ar
Cel.Offset(0, 2).Value = Astr
End Select
End Sub