Hello,
why
With xlChartObj(4)
.ChartType = xlPieExploded
.SeriesCollection.NewSeries
.SeriesCollection(1).Name = "='Sheet1'!$A$4"
.SeriesCollection(1).Values = "='Sheet1'!$H$4:$J$4"
.SeriesCollection(1).XValues = "='Sheet1'!$H$3:$J$3"
.ApplyLayout (6)
.ChartTitle.Text = "Chart Example"
End With
works
and
With xlChartObj(4)
.ChartType = xlPieExploded
.SeriesCollection.NewSeries
.SeriesCollection(1).Name = "='" & xlSheet(4).Name & "'!" & strValueName
.SeriesCollection(1).Values = "='" & xlSheet(4).Name & "'!" & strValues
.SeriesCollection(1).XValues = "='" & xlSheet(4).Name & "'!" & strValueString
.ApplyLayout (6)
.ChartTitle.Text = "Chart Example"
End With
doesn't while the content is the same ?
How can I assign a range tp my series ?
Daniel
Moderator's Edit: Use code tags when posting code. To do so in future, select your code and click on the # icon at the top of your post window.
Bookmarks