Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can an excel workbook be protected to prevent copying? 2

Status
Not open for further replies.

R9772

Technical User
Aug 15, 2002
76
0
0
US
can anyone help me protect a workbook so that it cannot be copied from one place to another and then ammended? Or is this even possible?
 
G'day,

Have you tried going into the properties of the file and then changing the security settings?
 
i haven't tried that. just as a little back ground i have a spreadsheet that i want people to only be able to edit certain areas. unfortunately, if they copy and paste the spreadsheet into a new spreadsheet all of my protection passwords are null and void. is there a way around this?
 
R9772

You might want to protect workbook (Tools/Protection/Protect Workbook). First, leave only those worksheets that are needed and protect them also.

Vladk
 
i just tried that and unfortunately the file can still be copied. is there a way to disable the copy function via visual basic?
 
R9772,
The ability to copy the files is controlled by Windows (security features). If your customers want to work with some files you have not created then you will not be responsible for this activity. When they create a file (even by copy) then they will be responsible for whatever that file doing. Just put a warning label or message if you wish.

Vladk
 
Hi,

You could set up the workbook in the open event to test the path/filename. If it does not equal the original path/filename, then it just closes down.

So if it were saved with a different name OR renamed or copied, it could not be opened UNLESS macros were disabled.

In the case of macros disabled, you could use vba in the before save event to make a dummy sheet visible and make all other sheets VERY HIDDEN, such that opening without macros would render the workbook unviewable, and change the visible properties of the sheets in the workbook open event. Of course you would need to password protect the VBA project.

:)


Skip,
Skip@TheOfficeExperts.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top