Showing changes on-screen like in Word

  • Thread starter Thread starter Frank Kabel
  • Start date Start date
In Word, when you choose Track Changes, changes are visible on-screen
in red/strikethru whatever. In Excel, Track Changes uses something
similar to a Comment Box. Is ther a way to automatically mimic Word
functionality for changes in Excel? TIA.
 
You could try adding something like this to
'roll your own':

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Value <> old_X_Value Then
With Target
.Font.ColorIndex = 41
.Font.Underline = xlUnderlineStyleSingle
.Font.Bold = True
.AddComment (Now() & ": (Prev)" & Str
(old_X_Value))
End With
End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
old_X_Value = Target.Value
End Sub

Good luck
Jeff
 
Here is some better code (it appends to an existing
comment)
Dim old_X_Value As Variant
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Value <> old_X_Value Then
With Target
.Font.ColorIndex = 41
.Font.Underline = xlUnderlineStyleSingle
.Font.Bold = True
On Error Resume Next
x$ = .Comment.Text
.Comment.Delete
If Len(x$) <> 0 Then
.AddComment x$ & ";" & Now() & ": (Prev)" &
Str(old_X_Value) & " "
Else
.AddComment Now() & ": (Prev)" & Str
(old_X_Value) & " "
End If
On Error GoTo 0
End With
End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
old_X_Value = Target.Value
End Sub

jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top