Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • 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
Joined
Aug 23, 2001
Messages
13
Location
US
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)?
 
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

Back
Top