Protect Items in a Workbook
Protecting prevents changes to parts of a workbook. You can apply protection to worksheets, charts, ranges, formatting, and window layout. Protection can use a password or it may omit the password if the protection is intended to prevent accidental changes rather than malicious ones.
You can protect multiple items within a workbook and you can use different passwords for each of those items, though that’s generally a bad idea. The more passwords you use, the more likely you are to confuse them—especially within a single workbook. It’s a good idea to use the same password when protecting multiple items.
To prevent changes to a worksheet:
Add data to your worksheet and adjust the formatting so that it appears the way you want it to.
From the Tools menu, choose Protection, then Protect a Sheet. Excel displays the Protect Sheet dialog box shown in Figure 26-7.
Figure 26-7. Use protection to prevent changes
Type a password and select the actions you want to permit on the worksheet from the list. Click OK. Excel prompts you to confirm the password.
After a worksheet is protected, you can’t change it without unprotecting it first. To unprotect the worksheet, select Tools → Protection → Unprotect Sheet and enter the password.
Worksheet protection applies to all of the locked cells on a worksheet. To allow users to edit some cells on a worksheet while protecting most ...
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.