Hi,
I am wondering if anyone would be able to help with copying a workbook of excel tables and charts into PPT?
I was able to get the code to work to copy the table (range D3 to V21) into ppt, however, when I added in the following code I got a Compile error (invalid Next control variable reference in step 8:
'Copy the chart and paste it into the PowerPoint as a Metafile Picture
xlwksht.Select
For Each cht In xlwksht.ChartObjects
cht.Activate
ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
PPSlide.Shapes.Paste.Select
I tried various way to select a chart on the worksheet, but none seems to work. Any help is appreicated.
https://www.dropbox.com/s/jl14nqt3r88j47h/Model%20Export%20macro%20test.xlsm
A sample file is attached for reference. Thank you.
I am wondering if anyone would be able to help with copying a workbook of excel tables and charts into PPT?
I was able to get the code to work to copy the table (range D3 to V21) into ppt, however, when I added in the following code I got a Compile error (invalid Next control variable reference in step 8:
'Copy the chart and paste it into the PowerPoint as a Metafile Picture
xlwksht.Select
For Each cht In xlwksht.ChartObjects
cht.Activate
ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
PPSlide.Shapes.Paste.Select
I tried various way to select a chart on the worksheet, but none seems to work. Any help is appreicated.
https://www.dropbox.com/s/jl14nqt3r88j47h/Model%20Export%20macro%20test.xlsm
A sample file is attached for reference. Thank you.