Programing to save who and when someone update the file
I'm trying to programing the file to save in the column "R" and "S" the timing and user who updated the file, but this only works for updating in the first column...how can I do to works in all colums (from A to Q)?
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo TratarErro
If Target.Column = 1 And Target.Value < "" Then
Application.ScreenUpdating = False
Target.Offset(0, 1).Value = Now()
Target.Offset(0, 2).Value = VBA.Environ("username")
End If
TratarErro:
Application.ScreenUpdating = True
End Sub
|