convert an existing chart to use arrays instead of cell references and make it independent of the original data : Chart « Excel « VBA / Excel / Access / Word
convert an existing chart to use arrays instead of cell references and make it independent of the original data
Sub ConvertSeriesValuesToArrays()
Dim seSeries As Series
Dim myChart As Chart
On Error GoTo Failure
Set myChart = ActiveSheet.ChartObjects(1).Chart
For Each seSeries In myChart.SeriesCollection
seSeries.Values = seSeries.Values
seSeries.XValues = seSeries.XValues
seSeries.name = seSeries.name
Next seSeries
Exit Sub
Failure:
MsgBox "Sorry, the data exceeds the array limits"""
End Sub