How is ti possible to add chart elements as axes, axis title, chart title, data lable, data table, legend
with macro recorder i had become following commands in vba
ActiveChart.Legend.LegendEntries(1).Select
ActiveChart.FullSeriesCollection(1).Name = "=""2021"""
ActiveChart.FullSeriesCollection(1).Values = "=Tabelle1!$A$1:$A$5"
ActiveChart.FullSeriesCollection(2).Name = "=""2022"""
ActiveChart.FullSeriesCollection(2).Values = "=Tabelle1!$B$2:$B$5"
ActiveChart.FullSeriesCollection(3).Name = "=""2023"""
ActiveChart.FullSeriesCollection(2).Values = "=Tabelle1!$C$1:$C$5"
in msexcel.cpy i found the following commands
Method: "getLegend".
01 Legend Legend.
invoke returning Legend.
Method: "getChartTitle".
01 ChartTitle ChartTitle.
invoke returning ChartTitle.
Method: "ApplyDataLabels".
01 Type-CBL XlDataLabelsType.
01 LegendKey VARIANT.
01 AutoText VARIANT.
01 HasLeaderLines VARIANT.
invoke using
by value Type-CBL *> [IN][OPTIONAL]
by value LegendKey *> [IN][OPTIONAL]
by value AutoText *> [IN][OPTIONAL]
by value HasLeaderLines *> [IN][OPTIONAL].
but there is no setChartTitle
The chart is coming, but i not perfect, here my table (as example)
A B C D
1 Country 2021 2022 2023
2 USA 1000 1200 1400
3 Germany 800 1000 1200
4 France 750 950 1150
5 Japon 1200 1400 1600
i must define the rows-title as "2021", "2022", "2023" and the Chart Data A2:D5
Thanks Chris for your help!
