HasLegend Property
TOC
Collapse the table of content
Expand the table of content

Chart.HasLegend Property (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.

True if the chart has a legend. Read/write Boolean.

expression .HasLegend

expression A variable that represents a Chart object.

This example turns on the legend for Chart1 and then sets the legend font color to blue.

With Charts("Chart1") 
 .HasLegend = True 
 .Legend.Font.ColorIndex = 5 
End With

Concepts

Other resources

Show:
© 2016 Microsoft