

Worksheets("sheet1").ChartObjects(1).Chart _

The following example changes the font style for the text of the legend entry at the top of the legend (this is usually the legend for series one) in embedded chart one to italic. Then, choose the fill type (whether you want a solid color as your pie chart background, or whether you want the fill to be gradient or patterned), and the background color. You can change the background color by clicking on the paint bucket icon under the 'Format Chart Area' sidebar.
HOW TO CHANGE TEXT IN EXCEL LEGEND HOW TO
LegendEntries(1) is at the top of the legend LegendEntries(LegendEntries.Count) is at the bottom. How to Edit a Pie Chart in Excel Background Color. The index number represents the position of the legend entry in the legend. You cannot return legend entries by name. Use LegendEntries ( index), where index is the legend entry index number, to return a single LegendEntry object. With Worksheets("sheet1").ChartObjects(1).Chart.Legend The following example loops through the collection of legend entries in embedded chart one and changes their font color. Use the LegendEntries method of the Legend object to return the LegendEntries collection. The formatting properties for the entry marker and its associated series or trendline are contained in the LegendKey object. RemarksĮach legend entry has two parts: the text of the entry, which is the name of the series or trendline associated with the legend entry and the entry marker, which visually links the legend entry with its associated series or trendline in the chart. A collection of all the LegendEntry objects in the specified chart legend.
