Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to copy some charts from Excel to PP slides using VBA in Excel

Status
Not open for further replies.

automaker

Technical User
Aug 21, 2007
64
US
My data and formatted charts are in Excel(2002). I need to copy and paste them as pictures into Powerpoint slides. I really want to do this using VBA as it will need to be done weekly. I have figured out how to launch Powerpoint but that is about as far as I'm getting. I need to open a file (it can be existing) and then transfer the charts and save/close the file. I'm sure this can be done. Is there some documentation on doing this anywhere? Any help is appreciated.

Thanks,
 
Skip,
I had to go out of town for a while. I haven't had a chance to work on this but will try soon.

Is there a way through the code to check if a given object library is referenced, and if not go ahead and establish the reference? The reason I ask is that the program may be used on other machines.

Thanks,
Mark
 
Skip,
I think you got me far enough that I can do what I need to do now. I really appreciate all the help.

Mark
 
Skip,
Remember me? My last note was back in December. Anyway, I wanted to get back in here and thank you for all you did. I have a working program now and I am in the process of refining some of the procedures, documenting it in case I get run over some day, and enhancing some of the capabilities. The current function is as follows

The program reads data that is exported from some database application that I am not allowed to connect to using a program. The data is checked for a multitude of potential errors that should have been caught at the point of input but aren't. Counts and other more complicated calculations are performed in Excel and summary tables are populated. Charts that use those tables are, of course, automatically updated. Tables of significant issues are created and formatted in Excel. Once the data is summarized, the program launches PowerPoint and opens a presentation I am using as a template. The Excel charts and tables are copied and pasted into the presentation and resized to fit the slides. The eventual number of slides in the presentation is not fixed but data dependent so where necessary, the program creates and adds new slides. Text boxes with dates are updated, and charts with no data have a textbox added explaining that there is no data for that chart. In other words, the program automates the process from raw data, through summary calculations, to final result presentation with no manual intervention.

I am very happy with how this application has turned out and I have described it in some detail above because I want you and any of those reading this to know how much I appreciate the help you gave me. There is no doubt that without your help, I would not have been able to complete this application and I owe you.

Thanks for everything.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top