I create charts from some data:
But on Excel there are different subtypes of the xlColumnStacked chart…
I need to show the second one, not the default one.
It has to be programmatically, not manually.
I tried to record the macro and see what does the change, but it doesn’t record anything… I tried loading from Templates also but they don’t work exactly like the one I need.
Thanks for your support.
I thing you have to change .ChartTyp
ActiveChart.ChartType = 52
Here is list of proper Value
If you want to switch x axis and y axis data try one of this:
ActiveChart.PlotBy = xlColumns ActiveChart.PlotBy = xlRows
I hope I helped 🙂
They both looked like stacked columns. VBA doesn’t have chart subtypes, and controls the chart type using this syntax:
ActiveChart.ChartType = xlColumnClustered ActiveChart.ChartType = xlColumnStacked ActiveChart.ChartType = xlColumnClusteredStacked100
VBA’s Object Browser shows you all of the possibilities.