Returns or sets a value that determines whether the layer is editable.
Read-write property
object.Editable = [ value ] |
Boolean
Use the CanEdit property to check that the layer can be edited before attempting to set Editable to True.
A layer that is editable will have its Edit check box checked in the Layers dialog box.
Make Layer Editable Example
Attempts to make the layer 'MyLayer' editable.
Make Layer Editable Example (VBScript) | Copy Code |
---|---|
Sub MakeEditable 'Check if the layer can be made editable If Not Application.Map.Layers("MyLayer").CanEdit Then MsgBox "MyLayer cannot be edited.",vbExclamation,"Error" Exit Sub End If 'If the layer is not already editable, make it editable If Not Application.Map.Layers("MyLayer").Editable Then Application.Map.Layers("MyLayer").Editable = True End If End Sub |