2
我正在一个项目上工作。在那我想检查图表是否有x或y轴。如果没有,然后添加它。即使我也想检查x或y轴是否有标题。如果没有,则提供标题。使用vba添加坐标轴到powerpoint图表?
因为我写了一个代码,检查x或y轴是否有标题。但如果不是那么如何添加标题呢?
这是在上面的代码我也想补充轴如果没有发现指定标题轴
Dim oSld As Slide
Dim oShp As Shape
Dim oShapes As Shapes
Dim yaxes as Boolean
Dim xaxes as Boolean
On Error GoTo Errorhandler:
For Each oSld In ActivePresentation.Slides
Set oShapes = oSld.Shapes
For Each oShp In oShapes
If oShp.HasChart Then
If oShp.HasChart Then
yaxes = oShp.Chart.Axes(xlValue, xlPrimary).HasTitle
xaxes = oShp.Chart.Axes(xlCategory).HasTitle
'check x axies have title
If xaxes <> True Then
' Add title
End If
'check y axies have title
If yaxes <> True Then
' Add title
End If
End If
End If
Next oShp
Next
所以一个代码。
谢谢。
感谢brettdj轴/标题。因为我不知道轴的其他属性多数民众赞成在为什么。 – 2012-02-01 03:35:22