LegendEntries

B

Bob Davison

Hello-

I have multiple series on a chart and only a few display at any time based
on a UserForm selection.

I wish to have a legend displayed at all times, showing only the
LegendEntries for the series that are currently visible. The
..Legend.LegendEntries(i).Delete method takes them off nicely. How do I get
the specific series legend entries back into the legend when other series
are visible the chart? I can't seem to find the method.

Thanks,

Bob
 
P

Peter T

Hi Bob,

In essence delete the legend and start again. I posted an example to
hide/unhide a series and its legend entry in this thread -

http://tinyurl.com/2ape9q

In passing, note with your 'LegendEntries(i).Delete', the only time you can
be sure the legendentries index correlates with the related series index is
just after creating a legend, when all keys exist, on a single axis chart,
and all series are the same chart-type.

Regards,
Peter T
 
B

Bob Davison

Thank you very much.

Peter T said:
Hi Bob,

In essence delete the legend and start again. I posted an example to
hide/unhide a series and its legend entry in this thread -

http://tinyurl.com/2ape9q

In passing, note with your 'LegendEntries(i).Delete', the only time you
can
be sure the legendentries index correlates with the related series index
is
just after creating a legend, when all keys exist, on a single axis chart,
and all series are the same chart-type.

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top