使图表轴位置低 - vba

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26662524/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-12 05:05:19  来源:igfitidea点击:

make chart axis position low - vba

excelvbaexcel-vba

提问by user1681664

The default x-axis position of the charts made by vba are in the middle. How do I make the axis on the chart show up on the bottom?

vba 制作的图表的默认 x 轴位置在中间。如何使图表上的轴显示在底部?

my current code:

我目前的代码:

ActiveSheet.Shapes.AddChart.Select
ActiveChart.SetSourceData Source:=Range("I3", Sheets("Main").Range("L3").End(xlDown).Address)
ActiveChart.ChartType = xlLine
With ActiveChart.Parent
.Height = 400
.Width = 800
End With

回答by Matteo NNZ

Just use the TickLabelPosition property of your axis:

只需使用轴的 TickLabelPosition 属性:

ActiveChart.Axes(xlCategory).TickLabelPosition = xlTickLabelPositionLow