Peter Muller
Board Regular
- Joined
- Oct 15, 2018
- Messages
- 133
- Office Version
- 365
- Platform
- Windows
Good morning,
I have a workbook that I share with other users. Several sheets are locked, and password protected.
I am looking for code to unprotect all the locked sheets, which is password protected, when I work in the file, but instead of entering the unprotect password several times, can I just enter the password once?
Using code:
Sub UnprotectAll()
Dim S As Variant
For Each S In Array("Report", "Analysis", "Budget")
Worksheets(S).Unprotect
Next S
End Sub
I have a workbook that I share with other users. Several sheets are locked, and password protected.
I am looking for code to unprotect all the locked sheets, which is password protected, when I work in the file, but instead of entering the unprotect password several times, can I just enter the password once?
Using code:
Sub UnprotectAll()
Dim S As Variant
For Each S In Array("Report", "Analysis", "Budget")
Worksheets(S).Unprotect
Next S
End Sub