Class LegendEntries (PowerPoint VBA)

A collection of all the LegendEntry objects in the specified chart legend. To use a LegendEntries class variable it first needs to be instantiated, for example


Dim les as LegendEntries
Set les = ActiveWindow.RangeFromPoint.Chart.Legend.LegendEntries()

Count

Returns the number of objects in the collection.


Dim lngCount As Long
lngCount = ActiveWindow.RangeFromPoint.Chart.Legend.LegendEntries.Count

Item

Returns a single LegendEntry object from the collection.

Item (Index)

Index: The index number for the object.


Dim lgne As LegendEntry
Set lgne = ActivePresentation.Slides(1).Shapes(1).Chart.Legend.LegendEntries(Index:=1)