Locked Property

A Boolean value. Specifies whether the layer is locked.

Applies to objects: Layer

Syntax

[[Let] RetVal = ] object.Locked

[Let] object.Locked = SetVal

The Locked property syntax has these parts:

Part Description
object A reference to an instance of the object.
RetVal A Boolean type variable.
SetVal A Boolean type value.

Remarks

If Locked is TRUE, you won't be able to edit shapes on this layer. You can set the Locked property to TRUE only when the layer is not active.

Example

Dim MyLayer as Layer

' Get the second Layer of thisDoc set MyLayer = thisDoc.Layer(2) ' Make it Locked ' (assume that MyLayer is not active)
MyLayer.Locked = True

 

See Also

Layer Object, Document Object