I wrote a date/time stamp macro to auto update in a single, specified cell every time data is changed or entered in any other cell for specific worksheets in a workbook that have various other macros and functions. The code works perfectly when the sheets are NOT protected; however, it no longer functions when the worksheets are protected, giving me a "runtime error 1004"?? The following is what I have:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("D3:AJ100")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Range("B1").Value = Now
Application.Enable Events = True
End Sub
I am very new to this, so any help would be greatly appreciated! Thank you for your time and Happy Holidays.
-Kristin
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("D3:AJ100")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Range("B1").Value = Now
Application.Enable Events = True
End Sub
I am very new to this, so any help would be greatly appreciated! Thank you for your time and Happy Holidays.
-Kristin