?
Solved

Auto update / recalculate Excel links in PowerPoint

Posted on 2009-02-23
6
Medium Priority
?
1,420 Views
Last Modified: 2012-05-06
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.UpdateLinks' command each time a slide reappears.  Isn't there?

help  :)
0
Comment
Question by:thasgolas
  • 3
  • 3
6 Comments
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 23718671
0
 

Author Comment

by:thasgolas
ID: 23719066
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.
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 23719994
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
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:thasgolas
ID: 23724007
Ok. Sounds good, but I'm a beginner at the VBE stuff.
Got a little confused as to how to run the app.
0
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 500 total points
ID: 23724241
Have you inserted all the code in the ppt file?

Alt + F11 for the VBE
Insert Module:
Option Explicit
Dim X As New class1 ' Where class1 is the calss module inserted above
Sub InitializeApp()
    Set X.App = Application
End Sub

Insert CLass Module
Public WithEvents App As Application

Then return to the PPT and use alt + F8 to run the InitializeApp sub.

Back to the VBE class module:Double click on teh class module, (expand the vbaproject if necessary).  Select app in teh drop down and the event you want to use i.e. App_SlideShowNextSlide and insert your code i.e.
    'ActivePresentation.UpdateLinks'

Chris
0
 

Author Comment

by:thasgolas
ID: 23725567
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!
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Quickbooks hosting can do wonders to your enterprise but considering the points elaborated in the article which will help you to better analyze the outcomes. So scan your business, its needs and then move to the new world of limitless benefits.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question