HI I have the following code
This works fine but if the user uses copy and paste for more than one cell at a time it only puts the user name in the first cell (even though the cells have changed)
Is there a way of putting the user name in all cells that have been changed ?
Hope this makes sense
VBA Code:
Private Sub worksheet_change(ByVal Target As Range)
ActiveSheet.Unprotect "MS"
If Not Intersect(Range("A:A,H:H"), Target) Is Nothing Then
Application.EnableEvents = False
Cells(Target.Row, Cells(Target.Row, Columns.Count).End(xlToLeft).Column + 1).Value = _
Environ("username") & "-" & Date
End If
ActiveSheet.Select
With ActiveSheet
.Protect Password:="MS", AllowFiltering:=True, AllowSorting:=True
End With
Application.EnableEvents = True
End Sub
This works fine but if the user uses copy and paste for more than one cell at a time it only puts the user name in the first cell (even though the cells have changed)
Is there a way of putting the user name in all cells that have been changed ?
Hope this makes sense