protection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i am having trouble with protection. i can protect and unprotect a single sheet just fine. it's a whole workbook i can not protect. why? also i made a form, (single sheet) it is protected. i copied this form 300 times.(300 tabs total) each sheet is protected. how can i unprotect them all at once. holding the shift key and highlighting the tabs don't work. thanks for your time.
 
depending on the version of Excel

Tools protection - workbook
Tools Options Security - enter in Password
File Save As Tools General Options Enter Password



: i am having trouble with protection. i can protect and unprotect a single
sheet just fine. it's a whole workbook i can not protect. why? also i made a
form, (single sheet) it is protected. i copied this form 300 times.(300 tabs
total) each sheet is protected. how can i unprotect them all at once. holding
the shift key and highlighting the tabs don't work. thanks for your time.
 
Brian

"Grouped" worksheets cannot be unprotected. VBA is required.

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

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

Gord Dibben Excel MVP
 
Gord,
Thanks for all your help. I am not familiar with VB at all. I do not know where to enter the Sub info at. I did read some of the help on it but it made little scence. sorry for the confusion.
 
Thanks to all who helped. I have created the macros and everything is working great. Thanks again.
 
Back
Top