Add [LegendLayers Collection]

The Add method adds a layer to the legend collection. Returns an object.

Syntax

object.Add(LayerName)

Parameter

Type

Description

LayerName

String

Required. Specify the name of the layer to add.

Remarks

The layer name must be unique. For Add you can only have the layer represented in one legend.

Example

This example demonstrates how to add a map layer named "Classed Post-demogrid.dat" from the legend.

Set Legend = doc.AddLegend

Legend.LegendLayers.Add("Classed Post-demogrid.dat")

Used by: LegendLayers collection