record all changes to a cell?
One way:
Put this in your worksheet code module (right-click the worksheet tab
and choose View Code):
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If Not Intersect(.Cells, Range("A2")) Is Nothing Then
On Error GoTo ErrHandler
Application.EnableEvents = False
With Worksheets("Log")
With .Cells(.Rows.Count, 1).End(xlUp).Offset( _
1, 0).Resize(1, 3)
With .Item(1)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
.Item(2) = Application.UserName
.Item(3) = Me.Range("A2").Value
End With
End With
ErrHandler:
Application.EnableEvents = True
On Error GoTo 0
End If
End With
End Sub
Change the name of your log sheet to suit.
In article ,
"jiwolf" wrote:
Is it possible to record all changes to a cell within a workbook?
For example any changes that are made bu users of a workbook to cell A2?
TIA.
|