Good night to you all.

In advance, I excuse for my English, it's not my native language.

Anyway, I'm trying to automate one of the tasks I perform in my job. To do so, I'm trying to fetch a code that copies 25 tables from 4 different Excel sheets (same workbook) and paste them into Power Point. I've come across this article in Spreadsheet Guru that almost solves my problem:

https://www.thespreadsheetguru.com/b...erpoint%20open

In the website's example, the author creates an array to store the tables and another array with the PPT slides in which the tables will be copied to. However, his arrays have the same sizes, since he copies one single table to one single slide. So, he describes his arrays like this:

MySlideArray = Array(2, 3, 4, 5, 6)

MyRangeArray = Array(Sheet1.Range("A1:C10"), Sheet4.Range("A1:C10"), _
Sheet3.Range("A1:C10"), Sheet2.Range("A1:C10"), Sheet5.Range("A1:C10"))


My problem is: I have 25 tables and I want to copy them in 9 different slides (more than one table per slide), so my table array is bigger than my slide array

To do the copy and paste, the author uses a loop with this code:

'Loop through Array data
For x = LBound(MySlideArray) To UBound(MySlideArray)
'Copy Excel Range
MyRangeArray(x).Copy

'Paste to PowerPoint and position
On Error Resume Next
Set shp = myPresentation.Slides(MySlideArray(x)).Shapes.PasteSpecial(DataType:=2) 'Excel 2007-2010
Set shp = PowerPointApp.ActiveWindow.Selection.ShapeRange 'Excel 2013
On Error GoTo 0


Since I want to copy more than one table in one slide, how can I write my code? That author's logic is completely clear to me, but I can't find a way to modify it to my needs. How do I assign my tables to the respective slides?

Thank you a lot in advance!