请高手看一下下面一段宏有何问题
下面一段宏是要调整PPT中chart坐标轴中数字的字体以及大小,我直接在PPT中输入的宏,并没有通过excel。所以没有通过creatobject("Powerpoint.application")但是运行后没有一点反应,请高手帮忙看看,谢了!
Sub axes()
Dim ishape As Shape
For i = 1 To ActivePresentation.Slides.Count
For j = 1 To ActivePresentation.Slides(i).Shapes.Count
Set ishape = ActivePresentation.Slides(i).Shapes(j)
If ishape.Type = msoEmbeddedOLEObject Then
If ishape.OLEFormat.Object.Application.chart.Type = xlbarClustered Then
If ishape.OLEFormat.Object.Application.chart.hasaxis(xlvalue) = True Then
With ishape.OLEFormat.Object.Application.chart.axes(xlvalue)
.ticklabels.Font.Size = 12
.ticklabels.Font.Name = "Arial"
End With
ishape.OLEFormat.Object.Application.Update
End If
End If
End If
Next j
Next i
End Sub
页:
[1]