Legend object (Excel)

Represents the legend in a chart. Each chart can have only one legend.

Remarks

The Legend object contains one or more LegendEntry objects; each LegendEntry object contains a LegendKey object.

The chart legend isn't visible unless the HasLegend property is True. If this property is False, properties and methods of the Legend object will fail.

Example

Use the Legend property to return the Legend object. The following example sets the font style for the legend in embedded chart one on worksheet one to bold.

Worksheets(1).ChartObjects(1).Chart.Legend.Font.Bold = True

Methods

Name
Clear
Delete
LegendEntries
Select

Properties

Name
Application
Creator
Format
Height
IncludeInLayout
Left
Name
Parent
Position
Shadow
Top
Width

See also

Excel Object Model Reference