U
ulfb
Hello
After creating a new, dynamic pivot table (contents varies) I need to add a
chart - but can´t figure out how to set the source. None of these tries work.
Help appreciated!
regards
ulf
With ActiveSheet.ChartObjects.Add _
(Left:=500, Width:=375, Top:=75, Height:=225)
' .SetSourceData Source:=ActiveSheet.PivotTables("PivotAge")
' .SetSourceData Source:=ActiveSheet.Range("C10")
' .SetSourceData Source:=.Range("C10")
.SetSourceData Source:=Sheets("Age").Range("C10")
.Chart.ChartType = xlXYScatterLines
End With
After creating a new, dynamic pivot table (contents varies) I need to add a
chart - but can´t figure out how to set the source. None of these tries work.
Help appreciated!
regards
ulf
With ActiveSheet.ChartObjects.Add _
(Left:=500, Width:=375, Top:=75, Height:=225)
' .SetSourceData Source:=ActiveSheet.PivotTables("PivotAge")
' .SetSourceData Source:=ActiveSheet.Range("C10")
' .SetSourceData Source:=.Range("C10")
.SetSourceData Source:=Sheets("Age").Range("C10")
.Chart.ChartType = xlXYScatterLines
End With