I’ve created a chart in excel which need to refresh when there is a change in pivot slicer selection. Because of a dynamic trend line (based on user defined trend values) to be added haven’t created a pivot chart instead selecting values from a range that gets updated when pivot slicer selection changes. It works fine without the trend line but when the trend line is displayed and selection in slicer is changed, randomly I get 1004 error when selecting the line through VBA. While inspecting I found that the chart series names are somehow not updating.
Looks like empty chart
But when I right click on the chart and click select data (
Select Data Source Window
and click on any other series other than the default selected series the chart refreshes immediately and the series names appear (
Magically appearing series names
I’ve tried using refresh, activate but none works. Alternatively, if I save the excel, close and open it I can see the charts normally but that’s not a solution for me.
Kindly somebody help me overcome this issue.