|
本帖最后由 chuxiao1212 于 2018-6-11 11:02 编辑
Private Sub Worksheet_Change(ByVal Target As Range)
ChartObjects("sheet 1").Activate
With ActiveChart.Axes(xlCategory)
.MaximumScaleIsAuto = False
.MinimumScaleIsAuto = False
.MinimumScale = [AS37]
.MaximumScale = [AU37]
MajorUnitIsAuto = False
.MinorUnitIsAuto = True
.DisplayUnit = xl
.MajorUnit = [AW37]
End With
With ActiveChart.Axes(xlValue)
.MaximumScaleIsAuto = False
.MinimumScaleIsAuto = False
.MinimumScale = [AS39]
.MaximumScale = [AU39]
MajorUnitIsAuto = False
.MinorUnitIsAuto = True
.DisplayUnit = xl
.MajorUnit = [AW39]
End With
Target.Offset(1).Select
End Sub
求助:如何让图表的纵、横坐标轴同时随着单元格数值变化而变化?如何可以让横坐标轴的最小、最大值分别等于AS37和AU37,主刻度等于AW37;纵坐标轴的最小、最大值分别等于AS39和AU39,主刻度等于AW39? | 找了一段宏代码,我新手小白弄了半天没弄明白,激活不了宏,坐标没反应,求大神帮改一下。万分感谢。
|
|