Excited by the fact that VBA returned to Mac, but having trouble with code that works fine in Powerpoint 2007 for Windows (giving me a "Compile Error: User-defined type not defined" at the commented statement below):
Private Function m_CreateStackedChart(SourceData As Excel.Range) As Boolean
Dim pptShape As PowerPoint.Shape
Dim pptChart As PowerPoint.Chart ' // This line causes the error
Dim pptSlide As PowerPoint.Slide
Dim pptData As PowerPoint.ChartData
Dim shtData As Exc开发者_开发知识库el.Worksheet
Dim lngRow As Long
Dim lngCol As Long
Dim lngOutRow As Long
Dim lngOutCol As Long
Dim lngTopRow As Long
Dim lngNItems As Long
Dim dblXaxisSize As Double
Dim lngAxisFactor As Long
Dim strHolderName As String
Dim rngXData As Range
Dim rngYData As Range
Dim lngNRows As Long
Dim lngSeries As Long
Dim objDLabel As Object
Dim strFormat As String
....
End Function
Any help is appreciated
I don't think you'll be able to do much with charts in Mac PPT 2011, at least not as it stands as of July 2011 (after applying the first service pack).
The .Chart object isn't revealed in the PowerPoint 2011 object model. PowerPoint's VBA implementation and OM seem to be at about the stage things were at in Office 2007 before the first service pack for it came out.
I've just stumbled across this thread and whilst it's disappointing news, I just checked PowerPoint:mac 2016 and the Chart object model appears to be pretty well implemented in that product.
精彩评论