Hi Everyone,
The question might be seemed silly bit I couldn't find a way to figure something.
I am trying to update the SeriesCollection of a chart within a Chart Sheet.
Usually, if the chart is a regular worksheet, I use the following code:
Sub Test()
Dim Sh As Worksheet
Dim Cht As ChartObjects
Dim Ser As Series
Set Sh = Worksheets("MC-40 Graph")
Set Cht = Sh.ChartObjects("MC-40 Graph").Chart
For Each Ser In Cht.SeriesCollection
Ser.XValues = Range(Split(Ser.Formula, ",")(1)).Offset(, 1)
Ser.Values = Range(Split(Ser.Formula, ",")(2)).Offset(, 1)
Next
End Sub
Unfortunately it doesn't work my chart sheet.
Could you help me on this issue?
Thanks a lot