Unprotecting Worksheets
That fact that the passwords are different makes things a bit trickier...
Give this a try... You will need to copy the one line indicated to accomodate
all of the passwords that exist in the spreadsheet...
Sub UnprotectAll()
Call UnprotectSheets("Password1") 'Copy this
Call UnprotectSheets("Password2")
Call UnprotectSheets("Password3")
End Sub
Sub UnprotectSheets(ByVal strPassword As String)
Dim wks As Worksheet
On Error Resume Next
For Each wks In Worksheets
wks.Unprotect Password:=strPassword
Next wks
On Error GoTo 0
End Sub
--
HTH...
Jim Thomlinson
"Storm" wrote:
Hello.
I have a file that has multiple worksheets, each are protected (locked) with
a similar password for each worksheet. Is there a way to unprotect all
worksheets all at once without having to click on each sheet and unprotect it
that way? Is there a Macro? Or something?
Thank you!
Storm
|