I have a number of workbooks with different passwords.
Sometimes worksheets within a workbook.
I am not allowed to change them. So what I would like to do is loop thru all worksheets an try all the PW's
But I cannot get this to work.
Sub Un_Protect_All()
awsn = ActiveSheet.Name
For Each Sheet In Application.Worksheets
Sheet.Activate
ActiveSheet.Unprotect
Worksheets(awsn).Select
End Sub
Sometimes worksheets within a workbook.
I am not allowed to change them. So what I would like to do is loop thru all worksheets an try all the PW's
But I cannot get this to work.
Sub Un_Protect_All()
awsn = ActiveSheet.Name
For Each Sheet In Application.Worksheets
Sheet.Activate
ActiveSheet.Unprotect
ActiveSheet.Unprotect "1"
ActiveSheet.Unprotect "2"
ActiveSheet.Unprotect "3"
NextActiveSheet.Unprotect "2"
ActiveSheet.Unprotect "3"
Worksheets(awsn).Select
End Sub