Warning:
SetTimer and KillTimer are quite dangerous in inexperienced hands. It looks for the macro in memory and even if you close PPt (or there's a crash) without running KillTimer it will keep trying to run the code in that memory location (which no longer exists) Only bad things are going to happen!
John Wilson
Microsoft PowerPoint MVP
Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal _
lpTimerFunc As Long) As Long
Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
Dim lngTimerID As Long
Dim blnTimer As Boolean
Sub StartOnTime()
If blnTimer Then
lngTimerID = KillTimer(0, lngTimerID)
If lngTimerID = 0 Then
MsgBox "Error : Timer Not Stopped"
Exit Sub
End If
blnTimer = False
Else
lngTimerID = SetTimer(0, 0, 10000, AddressOf UpdateExcelLinks)
If lngTimerID = 0 Then
MsgBox "Error : Timer Not Generated "
Exit Sub
End If
blnTimer = True
End If
End Sub
Sub KillOnTime()
lngTimerID = KillTimer(0, lngTimerID)
blnTimer = False
End Sub
Public Sub UpdateExcelLinks()
Dim oShape As Shape
Dim oSlide As Slide
For Each oSlide In ActivePresentation.Slides
For Each oShape In oSlide.Shapes
If oShape.Type = msoLinkedOLEObject Then
oShape.LinkFormat.Update
End If
Next oShape
Next oSlide
MsgBox Now
End Sub