Class LegendEntry (PowerPoint VBA)
The class LegendEntry represents a legend entry in a chart legend. To use a LegendEntry class variable it first needs to be instantiated, for example
Dim lgne as LegendEntry
Set lgne = ActiveWindow.RangeFromPoint.Chart.Legend.LegendEntries(Index:=1)
Delete
Deletes the object.
ActiveWindow.RangeFromPoint.Chart.Legend.LegendEntries(1).Delete
Font
Returns the font of the specified object.
Dim cftFont As ChartFont
Set cftFont = ActiveWindow.RangeFromPoint.Chart.Legend.LegendEntries(1).Font
Format
Returns the line, fill, and effect formatting for the object.
Dim cftFormatted As ChartFormat
Set cftFormatted = ActiveWindow.RangeFromPoint.Chart.Legend.LegendEntries(1).Format
Height
Returns the height, in points, of the object.
Dim dblHeight As Double
dblHeight = ActiveWindow.RangeFromPoint.Chart.Legend.LegendEntries(1).Height
Index
Returns the index number of the object within the collection of similar objects.
Dim lngIndex As Long
lngIndex = ActiveWindow.RangeFromPoint.Chart.Legend.LegendEntries(1).Index
Left
Returns the distance, in points, from the left edge of the object to the left edge of the chart area.
Dim dblLeft As Double
dblLeft = ActiveWindow.RangeFromPoint.Chart.Legend.LegendEntries(1).Left
LegendKey
Returns the legend key that is associated with the entry.
Dim lkyLegendKey As LegendKey
Set lkyLegendKey = ActivePresentation.Slides(1).Shapes(1).Chart.Legend.LegendEntries(1).LegendKey
Select
Selects the object.
ActiveWindow.RangeFromPoint.Chart.Legend.LegendEntries(1).Select
Top
Returns the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart).
Dim dblTop As Double
dblTop = ActiveWindow.RangeFromPoint.Chart.Legend.LegendEntries(1).Top
Width
Returns the width, in points, of the object.
Dim dblWidth As Double
dblWidth = ActiveWindow.RangeFromPoint.Chart.Legend.LegendEntries(1).Width