A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi,
try this code,
protect (from edit) only shapes in active sheet
Sub ProtectShapes_01()
With ActiveSheet
.Unprotect Password:="1230"
.Cells.Locked = False
End With
For Each s In ActiveSheet.Shapes
s.Locked = True
Next
ActiveSheet.Protect Password:="1230"
End Sub
XXXXXXXXXXXXXXX
also,
protect Shapes and specific cells
(in the sample below, protect 4 columns A:D)
Sub Protect_ShapesRange()
With ActiveSheet
.Unprotect Password:="1230"
.Cells.Locked = False
End With
For Each s In ActiveSheet.Shapes
s.Locked = True
Next
With ActiveSheet
.Range("A:D").Locked = True
.Protect Password:="1230"
End With
End Sub