I am wondering how to access a PowerPoint chart with VBA. I would like to change the y-axis parameters for my chart but can't seem to figure out how to get down to that level. I found the following example code in another forum but receive an error on the With Statement line of code. Any thoughts?
Sub Test()
Dim oSl As PowerPoint.Slide
Dim oSh As PowerPoint.Shape
Set oSl = ActivePresentation.Slides(1)
Set oSh = oSl.Shapes(1)
With oSh.OLEFormat.Object.WorkSheets(1)
.Range("A1").Value = .Range("A1").Value + 1
.Range("A2").Value = .Range("A2").Value - 1
End With
Set oSl = Nothing
Set oSh = Nothing
End Sub