ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Capture the legend title. Help (https://www.excelbanter.com/charts-charting-excel/17568-capture-legend-title-help.html)

Le9569

Capture the legend title. Help
 
Hello,

I create a macro for chart creation and have inputbox for X axis and YAxis
titles. Now in the legend, It shows "Series 1", "Series 2". Is there a way
to change it to the user's input?

Thank
le9569

Andy Pope

Hi,

You need to change the Name property of the series, so something like,

Activechart.SeriesCollection(1).name="My Seriesname"

Cheers
Andy

Le9569 wrote:
Hello,

I create a macro for chart creation and have inputbox for X axis and YAxis
titles. Now in the legend, It shows "Series 1", "Series 2". Is there a way
to change it to the user's input?

Thank
le9569


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


All times are GMT +1. The time now is 07:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com