• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA array code help

Mr.Karr

Member
Hello

Code:
'List of PPT Slides to Paste to
  MySlideArray = Array(2, 3, 4, 5, 6)

'List of Excel Ranges to Copy from
    MyRangeArray = Array(Sheet1.Range("A1:C10"), Sheet4.Range("A1:C10"), _
      Sheet3.Range("A1:C10"), Sheet2.Range("A1:C10"), Sheet5.Range("A1:C10"))

With the above snippet, I need that to be modified below;

a) SlideArray - Modify that to fit n number of slides depends upon the requirement
b) MyRangeArray - Modify that to read & export ranges by the home tab. Looping style.
With myPresentation.PageSetup
shp.Left = (.SlideWidth \ 2) - (shp.Width \ 2)
shp.Top = (.SlideHeight \ 2) - (shp.Height \ 2)
End With
c) SlideSetup - Respective to the range, make it to cover full slide (leave space to title)

Snapshot about the attached file;
This file automates export multiple ranges to PPT. You will see 2 files; a PPT presentation (file attached as an object inside the excel) and an excel file. You need to have the PPT open to run the macro.

Thanks a lot in advance. Karr
 

Attachments

  • Multiple Excel Ranges to PowerPoint Slides.xlsm
    385.9 KB · Views: 7
those who are trying to work this out: Do you require any additional info?
Please feel free to ask.

I am really struggling to get this work. Any help would be greatly appreciated!
 
Last edited:
Hi,

Here is an example file which automates the task but it exports ranges as table.
Can we able to modify this to export ranges as img or screenshot ? Thanks!
 

Attachments

  • Export Excel Ranges As Power Point Tables_recent.xlsm
    25.7 KB · Views: 1
Back
Top