MFish
Board Regular
- Joined
- May 9, 2019
- Messages
- 76
Code:
I don't understand how this doesn't work.... If there is ANY change within the range of D2:D10000 then it should put the Time, Date, and Username within the cells to the left of it... What's weird is that SOMETIMES it works... Then you save the workbook... Reopen it and then it doesn't. Yes, macros are enabled. Help!
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("D2:D10000")) Is Nothing Then Exit Sub
Application.EnableEvents = False
With Target
.Offset(0, -2).Value = Date
.Offset(0, -1).Value = time
.Offset(0, -3).Value = Environ("Username")
End With
Application.EnableEvents = True
End Sub
I don't understand how this doesn't work.... If there is ANY change within the range of D2:D10000 then it should put the Time, Date, and Username within the cells to the left of it... What's weird is that SOMETIMES it works... Then you save the workbook... Reopen it and then it doesn't. Yes, macros are enabled. Help!