[英]How to change the subtype of Chart from VBA code
我覺得你必須改變。ChartTyp
例如:
ActiveChart.ChartType = 52
這是正確值列表https://bettersolutions.com/excel/charts/vba-chart-types.htm
如果要切換 x 軸和 y 軸數據,請嘗試以下方法之一:
ActiveChart.PlotBy = xlColumns
ActiveChart.PlotBy = xlRows
我希望我有所幫助:)
它們看起來都像堆疊的柱子。 VBA 沒有圖表子類型,並使用以下語法控制圖表類型:
ActiveChart.ChartType = xlColumnClustered
ActiveChart.ChartType = xlColumnStacked
ActiveChart.ChartType = xlColumnClusteredStacked100
VBA 的 Object 瀏覽器向您展示了所有可能性。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.