thasgolas
asked on
Auto update / recalculate Excel links in PowerPoint
I'm using PowerPoint 2007 and I have a link to an Excel Spreadsheet. This sheet "updates" whenever the date changes (calculations based on TODAY() ) . I need code to make the PowerPoint presentation automatically update whenever the date (or in some cases, the time) changes.
How can this be done? So far, I can get it to 'work' with a 'fly-in' transition, if the mouse is appropriately located (so a 'mouseover' macro triggers), but this is an inconsistent workaround. There should be a way to incorporate a VBA 'ActivePresentation.Update Links' command each time a slide reappears. Isn't there?
help :)
How can this be done? So far, I can get it to 'work' with a 'fly-in' transition, if the mouse is appropriately located (so a 'mouseover' macro triggers), but this is an inconsistent workaround. There should be a way to incorporate a VBA 'ActivePresentation.Update
help :)
ASKER
PowerPoint 2007 does not seem to allow me to use that. I tried and, most on th etime, it would not even Add this add-in. When I dd manage to get it to install, it would not load.
Add a class:
In the VBE:
1. Insert class module:
Add contents:
Public WithEvents App As Application
2. Insert normal module:
Add contents:
Option Explicit
Dim X As New class1 ' Where class1 is the calss module inserted above
Sub InitializeApp()
Set X.App = Application
End Sub
Run this sub
In teh class module:
Select App and then the event you want to trigger your code.
Note InitializeApp needs to be run before the events will work.
Chris
In the VBE:
1. Insert class module:
Add contents:
Public WithEvents App As Application
2. Insert normal module:
Add contents:
Option Explicit
Dim X As New class1 ' Where class1 is the calss module inserted above
Sub InitializeApp()
Set X.App = Application
End Sub
Run this sub
In teh class module:
Select App and then the event you want to trigger your code.
Note InitializeApp needs to be run before the events will work.
Chris
ASKER
Ok. Sounds good, but I'm a beginner at the VBE stuff.
Got a little confused as to how to run the app.
Got a little confused as to how to run the app.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. That worked, only oddly, it took two rounds of slide changes for the
change to display - though, if consistent, that's more than good enough!
change to display - though, if consistent, that's more than good enough!
http://skp.mvps.org/autoevents.htm
Chris