View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default Change passwords Multiple sheets

Insert your current password into the UnProtectAllSheets sub and run it

Sub UnprotectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Unprotect Password:="current password"
Next n
Application.ScreenUpdating = True
End Sub

Then run this one with your new password inserted

Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Protect Password:="new password"
Next n
Application.ScreenUpdating = True
End Sub


Gord Dibben Excel MVP

On Fri, 23 Dec 2005 17:50:01 -0800, "bbc1"
wrote:

I have a workbook containing 20 sheets each is password protected with the
same password, I would like to change this password on each sheet without
having to open each sheet and do it individually