CokeOrCrack
Board Regular
- Joined
- Dec 13, 2015
- Messages
- 81
- I have a workbook that contains 10 sheets
- I would like a timestamp to appear in cell G10 for when any edit is made in one specific sheet
i.e. The specific sheet is named "General", so I'd like the timestamp to appear in G10 in "General"
- I don't want the timestamp to change if edits are made in any of the remaining 9 sheets
Q
How do I timestamp any edit to a specific sheet?
I have tried the following code, and it occasionally works, but it will eventually return this error:
"Run-time error '-2147417848 (80010108)':
Method 'Range' of object'_Worksheet' failed"
I don't understand why it initially works, but then returns the error.
Is this the best route to pursue for this question, or is there a better way?
Thanks
OJ
- I would like a timestamp to appear in cell G10 for when any edit is made in one specific sheet
i.e. The specific sheet is named "General", so I'd like the timestamp to appear in G10 in "General"
- I don't want the timestamp to change if edits are made in any of the remaining 9 sheets
Q
How do I timestamp any edit to a specific sheet?
I have tried the following code, and it occasionally works, but it will eventually return this error:
"Run-time error '-2147417848 (80010108)':
Method 'Range' of object'_Worksheet' failed"
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Sheets("General").Range("G10") = Now
End Sub
I don't understand why it initially works, but then returns the error.
Is this the best route to pursue for this question, or is there a better way?
Thanks
OJ