Legend Object [Excel 2003 VBA Language Reference]

Chart
Legend
Multiple objects

Represents the legend in a chart. Each chart can have only one legend. The Legend object contains one or more LegendEntry objects; each LegendEntry object contains a LegendKey object.

Using the Legend Object

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

Remarks

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.

Properties | Application Property | AutoScaleFont Property | Border Property | Creator Property | Fill Property | Font Property | Height Property | Interior Property | Left Property | Name Property | Parent Property | Position Property | Shadow Property | Top Property | Width Property

Methods | Clear Method | Delete Method | LegendEntries Method | Select Method

Parent Objects | Chart Object

Child Objects | Border Object | ChartFillFormat Object | Font Object | Interior Object