• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Troubleshoot Macro to Unprotect Sheets [SOLVED]

J G

Member
The code below was written to unprotect all sheets however it stops after the second tab. If you've read my early post, I tried updating it in a similar way however it still failed. What am I doing wrong?

Code:
Sub UnProtectSheets()
Dim wsheet As Worksheet
For Each wsheet In Worksheets
wsheet.Select
ActiveSheet.Unprotect Password:="ABC"
Next wsheet
End Sub
 
Nevermind, got it to work

Code:
Sub UnProtectSheets()
Dim wsheet As Worksheet
For Each wsheet In Worksheets

wsheet.Unprotect Password:="ABC"
Next wsheet
End Sub
 
Back
Top