PDA

View Full Version : Adding slides with linked data



grime
11-09-2006, 10:27 AM
First post! I am very familiar with VBA in Excel, but this is my first time writing code for PowerPoint. I hope someone out there can help me!

First, some background on my presentation:
I have a PowerPoint presentation that we use to review sales data with a customer for a whole district.
Each of their districts can have between 3-15 stores.
The presentation contains, besides the title page, table of contents, etc. a rollup of their sales for all stores combined.
The sales data on these slides are linked Excel worksheet objects, so when the data on the Excel sheet is changed or updated, the PP slides are as well.

My issue (read: pain in my @ss :banghead: ):
I want a slide for each store in the district, which contains, like the district rollup, linked Excel data.

What I am looking for is code that does the following things:
1. Looks to a specific cell in the Excel document which tells the number of stores in that district.
2. The PowerPoint will already contain 1 store-level detailed slide, linked to the data for store #1 in that district on the Excel workbook.
3. Duplicates the store #1 slide so we end with 1 store-level slide for each store in the district (# is from step #1 above).
4. Changes the linked data range for each slide, so store slide #2 (won't need to change #1, since it is already linked correctly) links to store #2's data, slide #3 links to store #3 data, and so on.

So, basically, the code does a lot of different things, none of which I know how to do.

Any suggestions?

Thanks in advance.