2016-12-15 127 views
0

使用VBA更新PowerpPoint 2016中的Powerpoint(非嵌入式Excel图表)后,当我右键单击图表并选择编辑数据时,图表不再允许编辑数据。如果我选择图表上部rHS上的过滤器符号,则会出现此错误。PowerPoint 2016图表在VBA更新后丢失数据表

链接文件不可用于编辑链接。点击编辑链接 以下文件。

超级链接点击它后什么都不做。

这是用于更新图表

For Each oSH In ActivePresentation.Slides(2).Shapes 

       oSH.Chart.SeriesCollection(1).values = "Sheet1!$B$1:$B" & maxrow ' change the series range before opening and closing the workbook object 
       oSH.Chart.SeriesCollection(1).XValues = "Sheet1!$A$1:$A" & maxrow 'max number showing is 6 data points 

        With oSH.Chart.ChartData 

          'this updates the values in the datasheet 
          .Workbook.sheets(1).Range("A1:B" & lrow - 2).Value = xlWorkBook.sheets(2).Range("A3:B" & lrow).Value 

        End With 

回答

0

后搜索和试验的天代码,我发现我的问题的解决方案。我没有创建幻灯片或图表,并发现数据在数据表的表格中。我在Excel工作表中编辑数据并将表格转换为一个范围。

奇怪的是,这解决了我的问题。