sodcalculator

10 Tech How-To

Protect Excel Sheets From Being Deleted: 6 Ways

Guide 10-58172 · Updated · Step by step

To stop an Excel sheet from being deleted, you need to change the workbook’s structure protection settings, not the sheet’s regular protection. This article explains six reliable methods—from simple right-click options to using the built-in “Protect Workbook” feature—so you can lock your sheets against accidental or intentional deletion in both Excel for Windows and Mac.

Why Sheets Get Deleted and What Actually Stops It

Excel offers two separate layers of security: worksheet protection (which locks cells and formulas) and workbook structure protection (which controls whether sheets can be moved, hidden, renamed, or deleted). Many users protect a sheet’s cells, only to find the whole tab can still be deleted. That’s because sheet deletion is governed by the workbook structure, not the sheet itself. To prevent deletion, you must enable “Protect Workbook” with the “Structure” checkbox selected. This is the core mechanism in all current Excel versions (2010 through Microsoft 365).

Method 1: Protect the Workbook Structure (Most Reliable)

This is the built-in, primary method. It prevents any sheet from being deleted, moved, hidden, or renamed. Here’s how to do it:

  1. Open your Excel file.
  2. Go to the Review tab on the ribbon.
  3. In the “Protect” group, click Protect Workbook.
  4. In the dialog box, make sure Structure is checked.
  5. Enter a password (optional but highly recommended) and click OK.
  6. Re-enter the password to confirm, then click OK.

Once enabled, right-clicking a sheet tab will show “Delete” as grayed out. The keyboard shortcut Alt+H+O+P+S (press sequentially) also opens the same dialog. To undo this, go to Review > Protect Workbook again, enter the password, and uncheck “Structure.”

Method 2: Use “Always Allow” via Information Rights Management (IRM)

If you’re using Microsoft 365 or a corporate account, you can use Information Rights Management (IRM) to set permissions that prevent editing, copying, or deletion. However, this is more about restricting access than preventing deletion within the file itself. It’s not a direct substitute for structure protection, but it adds a layer of control. To apply it: File > Info > Protect Workbook > Restrict Access. Choose “Restricted Access” and set permissions. Note that this requires your organization to have IRM set up, and it may not be available in all editions.

Method 3: Make the File Read-Only (Partial Protection)

Setting the entire file to read-only is a blunt instrument. It prevents any changes, including deletion, but it also prevents legitimate edits. You can do this via File > Save As > Tools > General Options > “Read-only recommended” or by setting the file’s attributes in Windows Explorer (right-click > Properties > Read-only). This is useful for distribution, but it’s not a secure lock—anyone can remove the read-only attribute if they have write permission to the folder.

Method 4: Hide the Sheet (Not a Real Solution)

Hiding a sheet (right-click tab > Hide) makes it invisible, but it can be easily unhidden (right-click any tab > Unhide). For a stronger version, you can set the sheet as “very hidden” using VBA. This hides it from the Unhide dialog, but it’s still not protected from deletion if the workbook structure is unprotected. To make a sheet very hidden:

  1. Press Alt+F11 to open the VBA editor.
  2. In the Project Explorer, select the sheet you want to hide.
  3. In the Properties window (F4), set Visible to 2 – xlSheetVeryHidden.
  4. Close the editor and save the file as a macro-enabled workbook (.xlsm).

This is a good complement to structure protection, but it doesn’t replace it.

Method 5: Use a Third-Party Add-In (Advanced)

Several third-party Excel add-ins offer “sheet lock” features that go beyond the built-in options. They often provide a more user-friendly interface for protecting multiple sheets at once, or they add password encryption that is harder to bypass. However, these are not free, and you should only download from reputable vendors. The built-in method is sufficient for most users, so this is only for those who need enterprise-level control.

Method 6: Combine with File-Level Encryption

For maximum security against deletion and tampering, you can encrypt the entire file with a password. Go to File > Info > Protect Workbook > Encrypt with Password. This requires a password to open the file at all. It doesn’t stop deletion once the file is open, but it prevents unauthorized users from even accessing the file to delete sheets. This is a good practice for sensitive data.

Common Problems and How to Avoid Them

  • Forgotten passwords: If you forget the structure protection password, you cannot unprotect the workbook through normal means. There is no official “backdoor” in Excel. You can try using a VBA macro to brute-force, but that’s unreliable and may not work on modern files. Always store passwords in a safe place.
  • Protection doesn’t apply to VBA: If you or someone else has access to the VBA editor, they can write a macro that deletes sheets even when structure is protected. To prevent this, you must also protect the VBA project (Tools > VBAProject Properties > Protection tab in the VBA editor).
  • Collaboration conflicts: In shared workbooks or co-authoring, structure protection may block other users from adding or deleting sheets, which can cause confusion. Communicate the protection to your team.
  • Mac vs. Windows differences: The menu names are similar, but on Mac, the option is under Review > Protect Workbook as well. The keyboard shortcuts differ.

Frequently Asked Questions

Can I prevent deletion of just one sheet, not all?

No, Excel’s built-in structure protection applies to the entire workbook. You cannot selectively protect only one sheet from deletion. If you need that, you would have to use VBA to intercept the BeforeDelete event, but that is complex and not foolproof.

Does protecting the workbook structure also prevent users from editing cells?

No. Structure protection only controls sheet-level actions (delete, move, hide, rename). To prevent cell editing, you must also protect each worksheet via Review > Protect Sheet, which locks cells. You can apply both protections simultaneously.

What happens if I forget the structure protection password?

You cannot unprotect the workbook without the password. There is no official recovery method. You can try third-party password recovery tools, but they are not guaranteed to work and may be costly. The best practice is to keep a backup of the unprotected file.

Will protecting the workbook structure stop someone from copying the data?

No. It only prevents deleting or moving sheets. A user can still copy cell contents, or even copy the entire sheet to a new workbook, as long as they can open the file. To prevent copying, you need to use worksheet protection with the “Select locked cells” option unchecked, but that also prevents selection, which is often impractical.

Can I protect the structure in Excel Online (Microsoft 365 web version)?

Yes, but with limitations. In Excel Online, you can go to Review > Protect Workbook, but you can only set it if the file is stored in OneDrive or SharePoint. The protection works, but you cannot set a password in the web version. You must set the password in the desktop app first.

Is there a way to make a sheet undeletable without a password?

You can set the workbook structure protection without a password. That prevents deletion, but any user can easily unprotect it (Review > Protect Workbook > uncheck Structure) because no password is required. It’s a deterrent, not a real lock.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →