CokeOrCrack
Board Regular
- Joined
- Dec 13, 2015
- Messages
- 81
The following code timestamps a sheet only when it has been edited:
The problem is that it will enter a new timestamp when the workbook has been opened/activated.
Question
Is there a way to make it so that only USER edits prompt a timestamp?
I would like to prevent the sheet activation from prompting a timestamp.
Can this be done in an if statement?
Thanks
OJ
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("G10:K10")) Is Nothing Then
Range("G10:J10") = Now
Range("K10") = Sheets("Numbers").Range("BC2")
Cancel = True
End If
End Sub
The problem is that it will enter a new timestamp when the workbook has been opened/activated.
Question
Is there a way to make it so that only USER edits prompt a timestamp?
I would like to prevent the sheet activation from prompting a timestamp.
Can this be done in an if statement?
Thanks
OJ