![]()
With ActiveSheet.ChartObjects(1).Chart With .SeriesCollection(1) .Smooth = True End With End With
Thanks, Andy.
But I got error on this one:
Do you know why?![]()
Dim aveSeries As Series For Each aveSeries In objChart.SeriesCollection aveSeries.Delete Next aveSeries Set aveSeries = objChart.SeriesCollection.NewSeries With aveSeries .Formula = "=Series(Chart_data!A2,Chart_data!$A$3:$A$15, Chart_Data!$E$3:E$15, 1)" .Smooth = True 'error, "this property is not valid for this chart type" End With
no idea. can you post example workbook.
When I create a test file the code bombs on the .Formula line
Andy,
It works now. I think the problem is I can't use this property before I define the chart type. Thank again. Here is my code:
![]()
Dim aveSeries As Series For Each aveSeries In objChart.SeriesCollection aveSeries.Delete Next aveSeries Set aveSeries = objChart.SeriesCollection.NewSeries With aveSeries .Formula = "=Series(Chart_data!A2,Chart_data!$A$3:$A$15, Chart_Data!$E$3:E$15, 1)" End With With objChart .HasLegend = False .ChartType = xlLineMarkers ......... End With With objChart With .SeriesCollection(1) .Smooth = True End With End With
That would make sense if the chart type is not a line chart.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks