Animated Excel-Charts in PowerPoint

Porley
NewLounger
Posts: 3
Joined: 07 Sep 2010, 09:20

Animated Excel-Charts in PowerPoint

Post by Porley »

Dear all,

I created a dynamic chart using Daniel Ferry's hints from http://www.excelhero.com, an excellent homepage, that shows some very strange stuff done in Excel from which I thought it is not possible to do this with Excel. I attached the file, so you get the idea.
Now I want to use these animated charts with the buttons in a powerpoint presentation. Unfortunately, I have no idea how to do this. I do not want to use a hyperlink that would open an new instance of Excel, because I want to prevent switching the application during the presentation.
Are there any ideas out there?
Any hint would be highly appreciated.

By the way, give excelhero a look, it is really worth the time!
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78492
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Animated Excel-Charts in PowerPoint

Post by HansV »

Welcome to Eileen's Lounge!

I'm afraid it will be very difficult, if not impossible, to reproduce this in PowerPoint. The formulas in the source range for the chart make heavy use of defined names.
Best wishes,
Hans

User avatar
HansV
Administrator
Posts: 78492
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Animated Excel-Charts in PowerPoint

Post by HansV »

By the way, I tried embedding the workbook in a PowerPoint slide, and calling the code from command buttons on the slide. Although the code did run, it didn't have a visible effect... :sad:
Best wishes,
Hans

Porley
NewLounger
Posts: 3
Joined: 07 Sep 2010, 09:20

Re: Animated Excel-Charts in PowerPoint

Post by Porley »

Dear Hans,

Thank you for your reply. It seems that I thought things too easy again. I believe these applications are all from Microsoft and therefore should interact easily. It seems reality writes another story...
Just one comment. My idea was not to reproduce this in Powerpoint but to use the Excel workbook within Powerpoint. I also tried to rund the code from Powerpoint but could not make it work. Would you mind sharing the code bites you used? It would be very informative.

Thanks again for your efforts.

Regards,
Porley

User avatar
HansV
Administrator
Posts: 78492
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Animated Excel-Charts in PowerPoint

Post by HansV »

I moved some of the code from the module of the Stingray sheet to a standard module, so that it can be called from "outside".
I embedded the workbook in a PowerPoint slide and named it XL.
I placed command buttons from the Control Toolbox on the slide, and used code like this:

Code: Select all

Private Sub cmdBestCase_Click()
  ActivePresentation.SlideShowWindow.View.Slide.Shapes("XL") _
    .OLEFormat.Object.Application.Run "AnimateChart", "=Data!$D$21"
End Sub
This code is in PowerPoint, not in Excel! But as mentioned, it didn't have a visible effect although it did run.
Best wishes,
Hans

Porley
NewLounger
Posts: 3
Joined: 07 Sep 2010, 09:20

Re: Animated Excel-Charts in PowerPoint

Post by Porley »

Dear Hans,

thanks for the code. I get the initial idea, and I will take some more time to work with this. Maybe there is a solution. If I find something, I will post it here.

Regards,
Porley