Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am trying to make it so that in my "Log" worksheet there will be a copied version of the row in which a change occured through out the rest of the workbook. I would like a before and after version of the row. all I have gotten so far is the following code which only notes specific details.

 Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
 Dim LR As Long
 If Sh.Name = "Log" Then Exit Sub
 Application.EnableEvents = False
 With Sheets("Log")
     LR = .Range("A" & Rows.Count).End(xlUp).Row
     .Range("A" & LR + 1).Value = Now
     .Range("B" & LR + 1).Value = Sh.Name
     .Range("C" & LR + 1).Value = Target.Address(False, False)
    .Range("D" & LR + 1).Value = Target.Value
 End With
 Application.EnableEvents = True
 End Sub

I was trying another code I found with no success:

Application.DisplayAlerts = False
With ActiveWorkbook
   .Save
   .KeepChangeHistory = True
   .HighlightChangesOptions When:=xlAllChanges
   .ListChangesOnNewSheet = True
   .HighlightChangesOnScreen = False
   .Worksheets("History").Select
End With
share|improve this question
 
Here is another approach that looks promising. –  chuff Jun 6 at 17:14

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.