Dec 28 2021 06:23 AM
I have a workbook using multiple tabs, all are password protected, I want to make a change that effects all tabs, can I unlock all tabs at one time?
Dec 28 2021 06:46 AM
You have to unprotect (and protect) them one by one. You could use macros for that:
Sub ProtectAll()
Dim w As Worksheet
For Each w In Worksheets
w.Protect Password:="secret"
Next w
End Sub
Sub UnprotectAll()
Dim w As Worksheet
For Each w In Worksheets
w.Unprotect Password:="secret"
Next w
End Sub
If you store these macros in your personal macro workbook Personal.xlsb, they will be available in all workbooks. You could assign the macros to Quick Access Toolbar buttons.
Dec 28 2021 06:51 AM
Dec 28 2021 07:01 AM
You can run the macro UnprotectAll to unprotect all sheets. The macro will do this one by one, but for you it's just one macro to run.
Similarly, if you want to protect all sheets, run the macro ProtectAll. Behind the scenes, this will protext them one by one.
Dec 28 2021 07:30 AM
Dec 28 2021 11:42 AM
Dec 28 2021 12:27 PM
Then you only need to copy/paste the code that I posted into a module.
Dec 28 2021 12:32 PM