Greetings,
I have the following code that when compiled will protect and unprotect all sheets in a workbook at once. However, I am trying to change the password but for some reason after I change the password in the code and compile and then enter it on the sheet, it wont accept the password. The only password it will confirm is "geo."
Any way to fix this?
![]()
Sub ProtectAllSheets() For Each ws In ActiveWorkbook.Worksheets ws.Protect Password:="geo" Next ws MsgBox "All Worksheets Protected" End Sub
![]()
Sub UnProtectAllSheets() For Each ws In ActiveWorkbook.Worksheets ws.Unprotect Password:="geo" Next ws MsgBox "All Worksheets Unlocked" End Sub
Bookmarks