Complete the code to select the chart type for a combo chart in Excel VBA.
chart.ChartType = xl[1]In Excel VBA, to create a combo chart, you set the ChartType property to xlColumnClustered for the main chart type, then set individual series types. There is no xlCombo chart type.
Complete the code to add a secondary axis to the second series in a combo chart.
chart.SeriesCollection(2).[1] = True
To plot a series on the secondary axis in Excel VBA, set PlotOnSecondaryAxis to True.
Fix the error in the code to set the chart type of the first series in a combo chart.
chart.SeriesCollection(1).ChartType = xl[1]
The first series in a combo chart is often a clustered column. Setting ChartType to xlColumnClustered is correct.
Fill both blanks to set the second series to a line chart and plot it on the secondary axis.
chart.SeriesCollection(2).ChartType = xl[1] chart.SeriesCollection(2).[2] = True
The second series is set to a line chart with xlLine and plotted on the secondary axis by setting PlotOnSecondaryAxis to True.
Fill all three blanks to create a combo chart with the first series as clustered column, and plot the second on the secondary axis.
chart.ChartType = xl[1] chart.SeriesCollection(1).ChartType = xl[2] chart.SeriesCollection(2).[3] = True
Set the chart type to xlCombo, first series to xlColumnClustered, and plot the second series on the secondary axis by setting PlotOnSecondaryAxis to True.