I am trying to change the chart type for 2 series. Series 1 should be a Column chart with the primary axis and Series 2 should be a Line Chart with the Secondary axis. I get a 438 error. WHat am I doing wrong. Please help. I am using Excel 2016
VBA Code:
Sub Chart1_Update()
Set wsPivotChart = Sheets("Daily")
Set pcw = wsPivotChart.ChartObjects("Chart 5")
pcw.FullSeriesCollection(1).ChartType = xlColumn '<---- This is where I get the error
pcw.FullSeriesCollection(1).AxisGroup = XlAxisGroup.xlPrimary
pcw.FullSeriesCollection(2).ChartType = xlLine
pcw.FullSeriesCollection(2).AxisGroup = XlAxisGroup.xlSecondary
End Sub