T
TEK
I currently have a macro which allows me to protect/unprotect multiple
wortksheets. However, how do I expand the code to apply all the protection
options when protecting? I keep receiving errors when manipulating the code
after referencing it from the macro recorder. My current code is as follows:
Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim N As Single
For N = 1 To Sheets.Count
Sheets(N).Protect Password:="password"
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:="password"
Next N
Application.ScreenUpdating = True
End Sub
wortksheets. However, how do I expand the code to apply all the protection
options when protecting? I keep receiving errors when manipulating the code
after referencing it from the macro recorder. My current code is as follows:
Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim N As Single
For N = 1 To Sheets.Count
Sheets(N).Protect Password:="password"
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:="password"
Next N
Application.ScreenUpdating = True
End Sub