Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count Legend entries? 1

Status
Not open for further replies.

logius

New member
Aug 23, 2001
13
Hi there, anyone know of a way of counting the number of entries (the elements in the legend) in an embedded chart (one that's not on it's own sheet)?
 
Replies continue below

Recommended for you

To count the number of legend entries, use

LegendNos=ActiveChart.Legend.LegendEntries.Count

LegendNos can have a value <= the no. of series in the chart.

Deleted legend entries are excluded from the count.
 
P.S. Of course, the chart must be activated before you can use the VBA code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor