recreate a deleted LegendEntry

X

xlrotor

If an individual LegenEntry has been deleted from an xy chart, is
there a way to bring it back again?

I am finding that the entire legend has to be re-created from
scratch. Whereas I'd like to just undelete the one absent
LegendEntry.

Thanks,

Brian
 
L

Leith Ross

If an individual LegenEntry has been deleted from an xy chart, is
there a way to bring it back again?

I am finding that the entire legend has to be re-created from
scratch. Whereas I'd like to just undelete the one absent
LegendEntry.

Thanks,

Brian

Hello Brian,

Unfortunately, it is the only way to do it. Here is an excerpt from
the VBA Help files...
___________________________________________________________________________________________________

Remarks
There's no direct way to return the series or trendline corresponding
to the legend entry.

After legend entries have been deleted, the only way to restore them
is to remove and recreate the legend that contained them by setting
the HasLegend property for the chart to False and then back to True.
___________________________________________________________________________________________________

Sincerely,
Leith Ross
 
X

xlrotor

Thank you for pointing that out, Leith.

I completely missed that "remarks" section in the excel help file for
the LegendEntry object.

Brian
 

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