Attribute VB_Name = "MasterControl" Option Explicit ' One button to lock or unlock every sheet in the workbook ' Free module from sourabsaha.com ' ' Change the password below before you use it. ' UserInterfaceOnly lets your own macros keep editing locked sheets. Public Const MasterPassword As String = "change-this-password" Public Sub ToggleMasterControl() Dim ws As Worksheet Dim locking As Boolean locking = Not ThisWorkbook.Worksheets(1).ProtectContents For Each ws In ThisWorkbook.Worksheets If locking Then ws.Protect Password:=MasterPassword, UserInterfaceOnly:=True, AllowFiltering:=True Else ws.Unprotect Password:=MasterPassword End If Next ws MsgBox IIf(locking, "All sheets are locked.", "All sheets are unlocked for editing."), vbInformation End Sub ' UserInterfaceOnly is not saved with the file. ' Call this from Workbook_Open in the ThisWorkbook module so macros keep working after reopening. Public Sub ReapplyProtection() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets If ws.ProtectContents Then ws.Protect Password:=MasterPassword, UserInterfaceOnly:=True, AllowFiltering:=True End If Next ws End Sub