Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Preventing Someone from Recreating a Protected Worksheet.
by Allen Wyatt
(last updated June 6, 2017)
Jack creates worksheets that he forwards to others in his group so they can input information, and then return the worksheet to him. He protects the worksheets, but has gotten burned a few times by users who have used copy and paste to recreate the worksheet in its entirety. Checking everything to make sure the returned worksheets are the originals is very time consuming, so Jack is looking for a way to remove the ability to copy and paste the worksheets.
Disabling copying and pasting is theoretically easy enough to do. All you need to do is use a short macro, like the following, in the ThisWorkbook object:
Private Sub Worksheet_Deactivate() If ActiveSheet.ProtectContents = True Then Application.CutCopyMode = False End If End Sub
Using this macro essentially clears the Clipboard every time someone deactivates the worksheet by selecting another worksheet or another application.
Of course, this offers only the most rudimentary of protection. A determined user can still copy the worksheet by using Edit | Move or Copy Sheet, or they could disable macros when starting the workbook, and thereby disable your Clipboard-clearing routine.
Perhaps a better way is to look at how business is done in the organization. If you don't want people to copy the worksheet, tell them up front, and make sure they know that you won't accept any duplicates. There are very easy ways to check to see if what you get back is a duplicate. Here are a few of them:
Another thing to try is to set the cell protection property to Hidden before password protecting your worksheet. Users can see the results of what is in the cells, but they cannot see the formulas. If they copy and paste the contents elsewhere, the formulas won't be transferred, only the results. This is very easy to spot in the returned workbook.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12653) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Preventing Someone from Recreating a Protected Worksheet.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
When you first create a worksheet, all the cells in that worksheet are formatted as locked. As you unlock various cells ...Discover More
If you receive a protected worksheet that you want to edit, how do you proceed if you try to unprotect the worksheet and ...Discover More
Need to protect a lot of worksheets? Rather than protect the sheets individually, you'll appreciate the macros discussed ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.