Locked Property [Excel 2003 VBA Language Reference]
Office 2003
True if the object is locked, False if the object can be modified when the sheet is protected. Read/write Boolean.
expression.Locked
expression Required. An expression that returns one of the above objects.
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.
expression.Locked
expression Required. An expression that returns one of the above objects.
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
Applies to | CellFormat Object | ChartObject Object | ChartObjects Collection Object | LinkFormat Object | OLEObject Object | OLEObjects Collection Object | Range Collection | Scenario Object | Shape Object | Style Object