P
Pam
Hi,
I have the following code that isn't working to lock the range of cells
listed on ss selected. By applying activesheet.protect, do I still need to
go to format>cells or tools>protection and set a password to protect this
sheet or does this line of code provide for that?
Sub DTProtectWhiteSpaceAllProd()
Worksheets("DT").Select
Cells.Select
Selection.Locked = False
Range("A146:A160").Select
Selection.Locked = True
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
End Sub
If anyone can tell me what I'm doing wrong I would appreciate it.
Thanks,
Pam
I have the following code that isn't working to lock the range of cells
listed on ss selected. By applying activesheet.protect, do I still need to
go to format>cells or tools>protection and set a password to protect this
sheet or does this line of code provide for that?
Sub DTProtectWhiteSpaceAllProd()
Worksheets("DT").Select
Cells.Select
Selection.Locked = False
Range("A146:A160").Select
Selection.Locked = True
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
End Sub
If anyone can tell me what I'm doing wrong I would appreciate it.
Thanks,
Pam