Locking a Worksheet Automatically

Written by Allen Wyatt (last updated May 18, 2023)
This tip applies to Excel 2007, 2010, and 2013


Andries has a shared workbook on a network and it works great. It allows multiple teachers at his school to make changes in the various worksheets, within limits he specifies through cell and worksheet protection. The shared workbook also allows him to track changes so he can see what happens to the data in the worksheets. Andries would like a way, though, to automatically "lock" a worksheet after a given date so it can no longer be changed. If he attempts to do it manually, he loses all of the tracked changes, which is unacceptable. He wonders if there is a way to lock a worksheet automatically, by date, and not lose the tracked changes.

There is no way to do this in Excel. The problem is just as you mentioned—when you unshared the workbook (which must be done to make the desired changes to it—you lose the tracked changes. This, for whatever reason, is designed into Excel. In fact, there are a number of features that are made unavailable whenever you share a workbook. The following page at the Microsoft site, even though it says it is for Excel 2003, is also applicable to later versions:

http://office.microsoft.com/en-us/excel-help/features-that-are-unavailable-in-shared-workbooks-HP005201080.aspx

There is one possible way around this if you want to protect the entire workbook: You could simply change the workbook itself so it is read-only. This would have to be done outside of Excel, simply because you cannot do it on a workbook that is currently open. It could, however, be done using a batch file, which means you could set up a Windows scheduled task to run it every day or week (whatever is best for your needs).

If you make the entire workbook file read-only, then people won't be able to change anything within it. That will help to "freeze" the workbook to whatever its condition is on a particular date.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13117) applies to Microsoft Excel 2007, 2010, and 2013.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Formatting Lots of Tables

Do you need a quick way to format your tables? Believe it or not, there are several tools you can use from Word's arsenal ...

Discover More

Checking All Cell Formatting in VBA

When your macro checks the formatting used for a cell, it needs to be careful that the type of formatting being checked ...

Discover More

Embedding Your Phone Number in a Workbook

Want to provide a bit of contact information in a workbook? A great place to do it (out of sight, but not inaccessible) ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Controlling Entry Order on Unprotected Cells

When you protect a worksheet, one of the benefits is that you can limit which cells can be used for data entry. How a ...

Discover More

Automatically Protecting After Input

Do you want user-entered data to be immediately protected so that it cannot be changed? This can be done relatively ...

Discover More

Password Protecting Specific Columns in a Worksheet

When you are developing a worksheet for others to use, you might want to protect some of the information in that ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is six more than 3?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

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.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.