Hello Team,
Appreciate your help with guidance,
I already have a vba code to track date, new value, username etc but I need to track the old value. I tried to track using workbook?selectionchange however is not working and is very important to track the old value.
Apreciate a lot your help on this.
Regards
Appreciate your help with guidance,
I already have a vba code to track date, new value, username etc but I need to track the old value. I tried to track using workbook?selectionchange however is not working and is very important to track the old value.
VBA Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim LR As Long
Dim Oval As String
If Sh.Name = "Historial" Then Exit Sub
Application.EnableEvents = False
With Sheets("Historial")
LR = .Range("A" & Rows.Count).End(xlUp).Row
.Range("A" & LR + 1).Value = Format(Now, "dd-mm-yy hh:mm:ss")
.Range("B" & LR + 1).Value = Sh.Name
.Range("C" & LR + 1).Value = Target.Address(False, False)
.Range("D" & LR + 1).Value = Target.Value
.Range("E" & LR + 1).Value = Environ("USERNAME")
.Range("F" & LR + 1).Value = Oval
End With
Application.EnableEvents = True
End Sub
Public Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Oval = Target.Value
End Sub
Apreciate a lot your help on this.
Regards