Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. 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 July 14, 2018)
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 the mouse to right-click on the sheet name and then click Move or Copy, 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, 2013, 2016, 2019, and Excel in Office 365. You can find a version of this tip for the older menu interface of Excel here: Preventing Someone from Recreating a Protected Worksheet.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
If you have a worksheet protected, it may not be immediately evident that it really is protected. This tip explains some ...Discover More
Excel allows you to protect your worksheets so they can only be changed as you want to have happen. If you unprotect a ...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.