How to Protect All Sheets With a Password in Excel
How to protect every sheet of an Excel workbook with the same password: built-in method, VBA loop, and a free macro that does both protect and unprotect.
2026-04-28
The "lock down before sharing" problem
You're sending a financial workbook to a client, an auditor, or an external partner. You want every sheet protected so they can read but not edit. Excel's Review > Protect Sheet works one tab at a time. For a 22-tab workbook, that's 22 password prompts.
Here's how to do it once for all tabs.
TL;DR — Key takeaways
- The built-in Review > Protect Sheet locks one tab at a time with a password.
- A VBA loop can apply the same protection to every tab.
- A free VBA macro prompts for the password once, applies it across all sheets, and asks you to confirm to prevent typos.
- WARNING: forgetting the password makes the protection hard to remove. Store the password before applying.
Method 1: Review > Protect Sheet (manual)
For each sheet:
- Review > Protect Sheet.
- Type password. Confirm.
- Click OK.
Works for one tab. For a 22-tab workbook, repeat 22 times.
Method 2: VBA loop
Sub ProtectAll()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Protect Password:="yourPasswordHere"
Next ws
End Sub
Drop in a module, edit the password, run. Protects every sheet.
The catch: the password is hardcoded in the VBA, which is a security and maintenance issue. Anyone who opens the VBA editor sees it.
Method 3: The free VBA macro
Download Protect All Sheets. Free .xlsm with one macro.
- Alt + F8, pick the macro, click Run.
- Type the password.
- Re-type to confirm.
- The macro applies sheet protection to every sheet. Popup confirms count.
The double-prompt prevents typo passwords. The password is never stored in the workbook (only used at runtime).
How strong is Excel sheet protection?
Sheet protection is a deliberate-edit barrier, not strong cryptography. External tools can crack typical sheet protection passwords in seconds to minutes. Use it to prevent accidental edits and casual tampering, not to secure sensitive data. For sensitive data, use file-level encryption (File > Info > Protect Workbook > Encrypt with Password).
A common scenario: auditor handoff
You're sending the audit binder to the audit team. Every tab should be protected so they can read but not modify cells.
- Save a copy of the workbook with
_audit_copyin the filename. - Open the copy.
- (Optional) Run Convert Formulas to Values on summary tabs to freeze the values.
- Run Protect All Sheets. Type your standard audit password.
- Save and send.
Auditor opens the file, sees every tab, can copy values for their working papers, can't accidentally modify your workbook.
Frequently asked questions
What if I forget the password?
Excel sheet protection is crackable. Search for "Excel password recovery utility". The fastest fix is usually to use one of those tools. For prevention: store the password in your password manager BEFORE running this macro.
What level of protection does it apply?
Default Excel protection: users can't modify cells, change formatting, insert/delete rows/columns, or edit objects. They CAN select cells (for copy purposes). For more restrictive protection, edit the .bas source.
Can I have different passwords per sheet?
This macro applies one password to all. For per-sheet passwords, you'd need a different macro or apply manually.
Will it protect very-hidden sheets too?
Yes. The macro processes every sheet regardless of visibility.
What to do next
For the reverse (taking protection off), use Unprotect All Sheets. Both macros pair for the lock-edit-relock workflow common in audit and consolidation work.