Enabling Editing Erases Worksheet

by Allen Wyatt
(last updated September 19, 2015)

5

Victor received a protected worksheet. When he tries to enable editing, the worksheet is erased to a blank sheet. There are no macros listed in the macro drop-down list, so Victor doesn't believe it is a macro that is doing the erasing. He wonders what he can do to edit and retain the worksheet.

Chances are good that there is some sort of macro at play in the workbook. It is important to realize that not all macros show up in the Macros dialog box; they can also be in other places in the workbook. A good indicator is the format in which the workbook is saved. If it has an XLSM or XLSB (as opposed to XLSX) file extension, then it is capable of holding macros and may very well contain them.

That being said, there are a few things you can try. First, it might be as simple as going back to whoever created the workbook and asking for a copy that is not protected. (If it was a person for company, they probably protected the worksheet for a reason.) If going back to the source is not possible, then you could change the macro security settings on your system and try opening the workbook. Start Excel and display the Developer tab of the ribbon. Near the left side of the ribbon, click the Macro Security tool. This displays the Trust Center. (See Figure 1.)

Figure 1. The Trust Center dialog box.

In the Macro Settings area, click the Disable All Macros without Notification, which is the most stringent security setting you can use in Excel. Click OK to close the dialog box, and then open the workbook. Excel should automatically disable any macros it contains and you may be able to unprotect the worksheet as you desire.

If this still doesn't work, you might try copying the worksheet to a different workbook. Right-click the worksheet tab, choose Move or Copy, and then use the settings in the resulting dialog box to make a copy of the worksheet into a brand new workbook. Close the original workbook, and you will probably be able to work with the copy just fine.

If all else fails, open a new workbook beside the original one (so both are visible at once), select all the cells in the original worksheet and press Ctrl+C. Now, select a cell in the new workbook and use Paste Special to Paste Values. You loose formatting and formulas using this technique, but you are able to retain the values to work with in the new workbook.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3134) 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

Getting Rid of the Paste Options Box

Paste something in a Word document, and you may notice a dynamic little set of options appear right next to what you pasted. ...

Discover More

Keeping Paragraphs on the Same Page

Don't want your paragraphs to flow from one page to another? Word provides a formatting setting that forces individual ...

Discover More

Conditionally Adding a Period in a Mail Merge

When merging data into a Word document, you may want to add information to the document based on an evaluation of what is ...

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)

Protecting a Worksheet's Format

You can protect various parts of your worksheets by using the tools built into Excel. One thing you can protect is the format ...

Discover More

Preventing Someone from Recreating a Protected Worksheet

When you share a protected workbook with other people, you may not want them to get around the protection by creating a new ...

Discover More

Locking a Worksheet Automatically

The protection features built into Excel can help you to make sure that only things are changeable that you want changed. ...

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}] 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 8 - 2?

2015-09-20 05:52:12

Michael (Micky) Avidan

@@@
I had a "small" mistake - holding the SHIFT key DISABLEs only Event-Macros - which is the important issue in our case.
-------------------------
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2016)
ISRAEL


2015-09-20 05:40:07

Michael (Micky) Avidan

@@@ To whom it may concern @@@
In order to DISABLE all macros (Event-Macros as well as regular macros) all you need is to open the workbook while the SHIFT key is pressed.
------------------------------
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2016)
ISRAEL


2015-09-19 14:11:10

Steve Adams

Assuming the workbook is in one of the Macro enable formats, the user could try doing a File > Save As and select the standard Excel File format (.xlsx).

A warning will appear saying that VB project cannot be saved in macro-free workbooks (such as .xlsx). Click Yes to save the file as a macro-free workbook.

After the Save As... is completed, then the user may be able to unprotect the workbook without erasing the worksheet.


2015-09-19 08:00:26

Col Delane

Why not suggest that the user open the Visual basic Editor and look at the ThisWorbook object and the sheet object for the target sheet to see if there are any macro's therein which may be erasing the sheet's contents?


2015-09-19 06:48:40

Petros

Macros can be deleted in a closed Excel file using the 'Macro Mover' addin

http://www.spreadsheet1.com/move-excel-vba-projects-from-one-workbook-to-another.html

Usually, with disabled Events, event triggered macros cannot be run to erase data, after unprotecting sheets.

Execute Application.EnableEvents=False or use addin below:

http://www.spreadsheet1.com/password-protection-remover-free-office-excel-add-in.html


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.