Диапазон данных не изменяется при запуске этого кода. Что я делаю не так?
Dim PowerPointApp As Object
Dim myPresentation As Object
Set PowerPointApp = CreateObject(class:="PowerPoint.Application")
Set myPresentation = PowerPointApp.Presentations.Open ("C:\Users\Mike\Documents\Standard template.potx")
myPresentation.Slides(4).Select 'Slide 4 contains my graph
ActiveWindow.Selection.SlideRange.Shapes(3).Select 'Shape 3 is my graph
Call ActiveWindow.Selection.SlideRange.Shapes(3).Chart.SetSourceData(Source:="'[C:\Users\Mike\Documents\My source file.xlsm]Graph data'!$B$21:$H$22", PlotBy:=xlRows)
Call ActiveWindow.Selection.SlideRange.Shapes(3).Chart.Refresh