Locked Property
Applies To
ChartObject object, ChartObjects collection object, LinkFormat object, OLEObject object, OLEObjects collection object, Range object, Scenario object, Shape object, Style object.
Description
True if the object is locked, False if the object can be modified when the sheet is protected. Returns Null if the specified range contains both locked and unlocked cells. Read/write Variant for the Range object; read/write Boolean for all other objects.
See Also
FormulaHidden property, Protect method, Unprotect method.
Example
This example unlocks cells A1:G37 on Sheet1 so that they can be modified when the sheet is protected.
Worksheets("Sheet1").Range("A1:G37").Locked = False
Worksheets("Sheet1").Protect