Legend.LegendEntries Method (Excel)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns an object that represents either a single legend entry (a LegendEntry object) or a collection of legend entries (a LegendEntries object) for the legend.

expression .LegendEntries(Index)

expression A variable that represents a Legend object.

Parameters

Name

Required/Optional

Data Type

Description

Index

Optional

Variant

The number of the legend entry.

Return Value

Object

This example sets the font for legend entry one on Chart1.

Charts("Chart1").Legend.LegendEntries(1).Font.Name = "Arial"

Concepts

Other resources

Show: