Hi All
What's the best way to update an Excel Chart using VBA?
At the moment, my script does some work to find the cell where the data is, then edits the Formula for the chart, but after a certain number of iterations this gives me a problem.
Like this:
does some string processing and then:
Any clues would be greatly received.
What's the best way to update an Excel Chart using VBA?
At the moment, my script does some work to find the cell where the data is, then edits the Formula for the chart, but after a certain number of iterations this gives me a problem.
Like this:
Code:
For i = 1 To chart_count + 1
Set chart_item = xlswk.Charts.Item(i)
series_count = chart_item.SeriesCollection.Count
For j = 1 To series_count
Set series_item = chart_item.SeriesCollection(j)
series_formula = series_item.FormulaR1C1
does some string processing and then:
Code:
series = series_formula_arr(0) & "," & xseries_output & "," & series_output & "," & j & ")"
series_item.FormulaR1C1 = series
Any clues would be greatly received.