Hi guys, I'm having a little trouble with a bit of code.
I don't really know much vba, and I usually manipulate existing code to do what I need.
This bit of code has me stumped and I can't find anything similar.
At the moment I'm trying to record changes to my worksheet when someone modifies the cells in certain ranges.
The code then tracks the changes in offset cells. What I need is to have these changes recorded in columns, AW, AX, & AY.
Any help on this would be greatly appreciated.
I don't really know much vba, and I usually manipulate existing code to do what I need.
This bit of code has me stumped and I can't find anything similar.
At the moment I'm trying to record changes to my worksheet when someone modifies the cells in certain ranges.
The code then tracks the changes in offset cells. What I need is to have these changes recorded in columns, AW, AX, & AY.
Any help on this would be greatly appreciated.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("C7:H229,K7:M229,P7:R229,U7:W229,Z7:AB229")) Is Nothing Then Exit Sub
Application.EnableEvents = False
With Target
.Offset(, 46).Value = Date
.Offset(, 47).Value = Time
.Offset(, 48).Value = Environ("username")
End With
Application.EnableEvents = True
End Sub