VBA, Excel Chart Axis Formatting

时间:2016-03-04 18:21:21

标签: excel vba excel-vba charts

I have charts made from a pivot(as I choose different pivot filters the chart changes). Some of the values are quite large others are quite small, which makes the charts hard to read sometimes as the Y Values are static.

Does anyone have any Code to alter this Y axis each time I change the chart, my idea is that each chart will be more legible with a fixed y axis each time? Any suggestions so I do have clearer charts is welcome.

Here are examples of what I currently have? I want to make the Y axis charge per each chart if possible.

!http://imgur.com/SKuRLFw

!http://imgur.com/6bdolZ7

Thanks

1 个答案:

答案 0 :(得分:0)

你可以尝试:

ActiveChart.Axes(xlValue).MinimumScale = ###
ActiveChart.Axes(xlValue).MaximumScale = ###

将###替换为您想要的值,或者您可以将MaximumScale定义为图表中显示的最大值,或者对其进行一些引用。