Unprotect all sheets at once
This tutorial shows how to unprotect all protected sheets in a single workbook at once through the use of VBA
METHOD 1. Unprotect all sheets at once using VBA
VBA
Sub Unprotect_All_Sheets()
'declare a variable
Dim ws As Worksheet
Dim ws As Worksheet
'loop through each worksheet in this workbook and unprotect them using the same password that was used to protect them
For Each ws In ThisWorkbook.Worksheets
For Each ws In ThisWorkbook.Worksheets
ws.Unprotect Password:="Pword"
Next ws
End Sub
ADJUSTABLE PARAMETERS
Password: Enter the same password that was used to protect the sheets by changing "Pword" in the VBA code.
Password: Enter the same password that was used to protect the sheets by changing "Pword" in the VBA code.
EXPLANATION
This tutorial shows how to unprotect all of the sheets in a single workbook at once through the use of VBA. The VBA code loops through each of the sheets in a workbook and using the same password that was used to protect the sheets it unprotects each sheet.
RELATED TOPICS
Related Topic | Description | Related Topic and Description |
---|---|---|
Protect all sheets at once | How to protect all sheets in a single workbook at once through the use of VBA | |
Protect a single sheet | How to protect a single sheet in a workbook using Excel or VBA | |
Unprotect a single sheet | How to unprotect a single sheet in a workbook using Excel or VBA |