scotthannaford1973
Board Regular
- Joined
- Sep 27, 2017
- Messages
- 115
- Office Version
- 2010
- Platform
- Windows
Hi all
I am building a new spread sheet and have included some code that when a cell changes, it puts the date and time of change in another cell - the code is below, used it before and it works as well as always. Unfortunately I have a new laptop and when I save the file, which now has the coding in, it always gives me the annoying message:
"Be careful! Parts of your document may include personal information that cannot be removed by the document inspector"
Saves okay, but how do I stop this coming up? even if I remove the code and save it, same bleddy message!
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo TheEnd
Dim r As Long: r = Target.Row
If r < 2 Then Exit Sub 'rules apply to row 3 onwards
If Not Intersect(Range("Q:R "), Target) Is Nothing Then
Application.EnableEvents = False
Range("R" & r) = Date & " - " & Time
End If
TheEnd:
Application.EnableEvents = True
End Sub
I am building a new spread sheet and have included some code that when a cell changes, it puts the date and time of change in another cell - the code is below, used it before and it works as well as always. Unfortunately I have a new laptop and when I save the file, which now has the coding in, it always gives me the annoying message:
"Be careful! Parts of your document may include personal information that cannot be removed by the document inspector"
Saves okay, but how do I stop this coming up? even if I remove the code and save it, same bleddy message!
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo TheEnd
Dim r As Long: r = Target.Row
If r < 2 Then Exit Sub 'rules apply to row 3 onwards
If Not Intersect(Range("Q:R "), Target) Is Nothing Then
Application.EnableEvents = False
Range("R" & r) = Date & " - " & Time
End If
TheEnd:
Application.EnableEvents = True
End Sub