求助,PPT中图表中的横坐标轴格式的对象代码是什么
在excel中是用TickLabels.NumberFormatLocal,但是在PPT中就不行了,总提示“方法和数据成员未找到”,求助! 因为PPT上的图标的横坐标轴格式不统一,所以想统一一下,代码如下,有较多问题,求解决Sub 修改月份格式()
Dim oSl As Slide
Dim oSh As Shape
Dim oCh As Chart
Dim i As Integer '记录修改的图表的数量
With ActivePresentation
i = 1
For Each oSl In .Slides
For Each oSh In oSl.Shapes
With oSh
If .HasChart Then
For Each oCh In .Chart
With oCh
.TickLabels.NumberFormatLocal = "[$-409]mmm-yy;@"
End With
i = i + 1
Next
End If
End With
Next
Next
End With
MsgBox i
End Sub 请看附件中的第四页,是修改后的横坐标模板,把其他页的变成这样就OK了。谢谢! 理论上应该是这样,但是也不行。
等高人吧
Sub MeThee()
Dim myOLEFormat As PowerPoint.OLEFormat
Dim myChart As Excel.Chart
With ActivePresentation
Set myOLEForamt = .Slides(1).Shapes(1).OLEFormat
Set myChart = myOLEFormat.Object
myChart.Axes(xlCategory, xlPrimary).TickLabels.NumberFormat = "[$-409]mmm-yy;@"
End With
End Sub
页:
[1]