"Be careful! Parts of your document may include personal information that cannot be removed by the document inspector"

scotthannaford1973

Board Regular
Joined
Sep 27, 2017
Messages
115
Office Version
  1. 2010
Platform
  1. 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
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
In Excel Options|Trust Center|Privacy Options try unchecking 'Remove personal information from file properties on save'.
 
Upvote 0
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
Do you have write VBA code with word “hide”? If yes, please change that word to another one.
 
Upvote 0
I do not understand this comment.
Is there a question here?
Sorry, I’m not good at English, But Can I show my case.
I wrote the code for closing the user form as below

Sub Test( )
Userform1.Hide
End

and after that, I always found this warning when I clicked to save.

"Be careful! Parts of your document may include personal information that cannot be removed by the document inspector"

And then , I changed new code as below

Sub Test( )
Unload Me
End

Finally, the warning did not show when I clicked to save anymore.
 
Upvote 0
And then , I changed new code as below

Sub Test( )
Unload Me
End

Finally, the warning did not show when I clicked to save anymore.
So, sounds like you already found a solution then, and are no longer in need of assistance.
Let us know if otherwise.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top