I need to be able to automatically insert user's username who made changes to the worksheet in a cell. Can you help how to do this.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim I As Range
Set I = Intersect(Range("C4:C500"), Target)
If I Is Nothing Then Exit Sub
Application.EnableEvents = False
Dim c As Range
For Each c In I
c.Offset(0, 1).Value = "trigger the username of person in code"
Next c
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim I As Range
Set I = Intersect(Range("C4:C500"), Target)
If I Is Nothing Then Exit Sub
Application.EnableEvents = False
Dim c As Range
For Each c In I
c.Offset(0, 1).Value = "trigger the username of person in code"
Next c
Application.EnableEvents = True
End Sub