Hi all.
Thank you, in advance, for your help.
I found this code to track any changes made to each tab. I have a table in columns A-AV (different rows for each tab, depending on the data).
Is there anyway to update this code to not track when rows are inserted?
Additionally, how would I write this to only track columns A to AV ?
Thank you, in advance, for your help.
I found this code to track any changes made to each tab. I have a table in columns A-AV (different rows for each tab, depending on the data).
Is there anyway to update this code to not track when rows are inserted?
Additionally, how would I write this to only track columns A to AV ?
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim LR As Long
Dim c As Range
Application.EnableEvents = False
With Sheets("Log Sheet")
For Each c In Target
LR = .Cells(Rows.Count, "A").End(xlUp).Row + 1
.Cells(LR, "A").Value = Sh.Name & "!" & c.Address
.Cells(LR, "B").Value = Now
.Cells(LR, "C").Value = c.Value
.Cells(LR, "D").Value = Application.UserName
Next c
End With
Application.EnableEvents = True
End Sub