![]() ![]() I couldn't find a visibility property for the SeriesCollection in the legend, however one workaround is to simply re-name the series as an empty string (this will make the series disappear from the legend) and then rename the series when you want to show it. When using the method above, the series name remains in the legend box. To view the name of your chart, select it and look in the name box (near where you would enter the cell value / formula). Set cht = Worksheets("Sheet1").ChartObjects("Chart 2").ChartĪnd likewise, setting the property to msoTrue made the line visible again.Īs for retrieving the chart itself I had to first activate it, then set my cht variable to the ActiveChart. 'Retrieve our chart and seriescollection objects' ![]() This code turned the visibility of the line off: Option Explicit I quickly created an Excel workbook and added a simple data set (just 1-10) and added a line graph "Chart 2" to the sheet Sheet1. I believe the property you are looking for is the property.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |