Hi Masters,
I have VBA Code to track logs changes in worksheet.
I want to track log changes only C1:N100 and ID nr in Column B1?
Please help??
CODE:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Dim ws As Worksheet: Set ws = Sheets("Audit")
Dim LR As Long: LR = ws.Range("Q" & Rows.Count).End(xlUp).Row + 1
ws.Range("Q" & LR & ":" & "U" & LR).Value = Array(ws.Name, Target.Address, Target.Value, Target.Formula, Environ("UserName"))
Application.EnableEvents = True
End Sub
I have VBA Code to track logs changes in worksheet.
I want to track log changes only C1:N100 and ID nr in Column B1?
Please help??
CODE:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Dim ws As Worksheet: Set ws = Sheets("Audit")
Dim LR As Long: LR = ws.Range("Q" & Rows.Count).End(xlUp).Row + 1
ws.Range("Q" & LR & ":" & "U" & LR).Value = Array(ws.Name, Target.Address, Target.Value, Target.Formula, Environ("UserName"))
Application.EnableEvents = True
End Sub