Dear snb,
In testing the code I've found that changing the interval is not so simple. The code for intervals of three did not work on my end.
The problem lies here
For example, if the worksheet has cells A1 through D9 filled, then the slide number values of j are: 1, 4, and 7.
However in this part of the
we only created 3 new slides, one for every 3rd row. And PowerPoint goes through trying to populate every 3rd slide with every 3rd row of Excel. But what was originally aimed for was to populate every individual slide with every 3rd row of Excel.
Therefore when running the second part of the code above, we get:
Run-time error '-2147188160 (80048240)'
Slides (unknown member): Integer out of range. 7 is not in the valid range of 1 to 4.
Because there is no 7th slide within the four slides we are working with.
So we're kind of back to the original question, which is how to populate individual slides with different intervals of data from Excel. I think it must simply not be possible to run two for next loops of varying intervals-- for slides = 1 to slides.count step 1, and for For j = 1 To UBound(sn) Step 3 -- simultaneously.
Bookmarks