Scheduled Macro execution Office 2007

  • Thread starter Thread starter Loopi
  • Start date Start date
L

Loopi

I am inexperienced with VB but can usually fake my way through some simple
tasks recording macros in Excel. However, In PowerPoint I need to create a
simple macro that forces PowerPoint 2007 to update links to an Excel workbook
that remains open at all times. The Excel work book is currently updating
using the OnTime Method and all is well there. I have an effective but
inflexible PowerPoint addin that forces link updates each time the
continuously looping presentation hits the first slide. Everything works well
until the presentation hits the first slide while the Excel is in the middle
of updating its links which can take up to 30 seconds to complete. When the
two update events coincide everything blows up??Even if I hard wire Excel to
update only at specific times I have no way to insure that PowerPoint will
not be updating at the same time. The short answer to this long description
is to have control of PowerPoint so that I can hardwire update times
eliminating the potential for clashes. Do I have the ability to use the
OnTime method in PowerPoint macros and if so, how do you initialize it.

Thank you
 
Thank you for the input. As mentioned earlier i am not real versed in VB. The
first option you described sounds interesting. What might the code look like
in my Excel macro to call the link update routing in powerpoint.

Thank you again for your response.
 
Not sure how or where to apply the Application.Run method:
In my excel workbook I have this code in the ThisWorkbook Object:

Private Sub Workbook_Open()
Application.OnTime Now + TimeValue("01:00:00"), "UDLink"
End Sub

UDLink macro is as follows in Module 1:

Public dTime As Date
Sub UDLink()

Application.DisplayAlerts = False

dTime = Now + TimeValue("01:00:00")

Application.OnTime dTime, "UDLink"

Sheets("Rotation Breakout").Select

ActiveWorkbook.UpdateLink Name:= _
"X:\0108 Production Reports.xlsb", _
Type:=xlExcelLinks
ActiveWorkbook.UpdateLink Name:= _


Application.DisplayAlerts = True
End Sub

This all works fine every hour. However I need powerpoint to updates its
links to this excel file shortly after excel finishes with it's updates

What I need is to execute the code below which resides in the presentation.
Lost - VB Loser here!!!!!!

Sub UDL()
ActivePresentation.UpdateLinks
End Sub

Both the spreadsheet and powerpoint presentation are open at all times. I do
not know the proceedure to call powerpoint routines in excel macro's

Thank you for any help you can provide
 
Back
Top