Class LegendKey (Excel VBA)
The class LegendKey represents a legend key in a chart legend.
Class LegendEntry gives access to class LegendKey.
Dim lky as LegendKey
Set lky = ActiveChart.Legend.LegendEntries(1).LegendKey
Methods
ClearFormats - Clears the formatting of the object.
Delete - Deletes the object.
Properties
Format returns the ChartFormat object.
Height returns a Double value that represents the height, in points, of the object.
InvertIfNegative true if Microsoft Excel inverts the pattern in the item when it corresponds to a negative number.
Left returns a Double value that represents the distance, in points, from the left edge of the object to the left edge of the chart area.
MarkerBackgroundColor sets the marker background color as an RGB value or returns the corresponding color index value. Applies only to line, scatter, and radar charts.
MarkerBackgroundColorIndex returns or sets the marker background color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Applies only to line, scatter, and radar charts.
MarkerForegroundColor sets the marker foreground color as an RGB value or returns the corresponding color index value. Applies only to line, scatter, and radar charts.
MarkerForegroundColorIndex returns or sets the marker foreground color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone. Applies only to line, scatter, and radar charts.
MarkerSize returns or sets the data-marker size, in points. Can be a value from 2 through 72.
MarkerStyle returns or sets the marker style for a point or series in a line chart, scatter chart, or radar chart.
PictureType returns or sets an XlChartPictureType value that represents the way pictures are displayed on a legend key.
PictureUnit2 returns or sets the unit for each picture on the chart if the PictureType property is set to xlStackScale (if not, this property is ignored).
Shadow returns or sets a Boolean value that determines if the object has a shadow.
Smooth true if curve smoothing is turned on for the legend key.
Top returns a Double value that represents the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart).
Width returns a Double value that represents the width, in points, of the object.
Related Classes
ChartFormat - Provides access to the Office Art formatting for chart elements.