J
jonco
I have a workbook where I want to make some cell protection changes on most
of the sheets. There are about 100 sheets so I'd rather not do them
individually.
I want to unprotect certain cells so that when the sheet is 'protected'
these cells can still be used for entry and pasting.
Here's what I have so far, but it's not working: (copied from another
workbook and modified)
'TempProtect ()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
Range("I2,J2,L2,N2,O2
2,A35:T36,A35").Select
IF Worksheet.name = "Index" Then Next (I want it to skip this
worksheet)
IF Worksheet.name = "Trans" Then Next (I want it to skip this
worksheet also)
IF Worksheet.name = "Customers" Then Next (I want it to skip this
worksheet too)
Selection.Locked = False
Selection.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
Next
End Sub
Any help you can give me is appreciated.
Jonco
of the sheets. There are about 100 sheets so I'd rather not do them
individually.
I want to unprotect certain cells so that when the sheet is 'protected'
these cells can still be used for entry and pasting.
Here's what I have so far, but it's not working: (copied from another
workbook and modified)
'TempProtect ()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
Range("I2,J2,L2,N2,O2
IF Worksheet.name = "Index" Then Next (I want it to skip this
worksheet)
IF Worksheet.name = "Trans" Then Next (I want it to skip this
worksheet also)
IF Worksheet.name = "Customers" Then Next (I want it to skip this
worksheet too)
Selection.Locked = False
Selection.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
Next
End Sub
Any help you can give me is appreciated.
Jonco