View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default macro to recalculate every 10 seconds

Public RunWhen As Double
Public Const cRunIntervalSeconds = 10
Public Const cRunWhat = "The_Sub"

Sub StartTimer()
RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime earliesttime:=RunWhen, procedu=cRunWhat, _
schedule:=True
End Sub

Sub The_Sub()
Calculate
StartTimer
End Sub

Sub StopTimer()
On Error Resume Next
Application.OnTime earliesttime:=RunWhen, _
procedu=cRunWhat, schedule:=False
End Sub

begin by running StartTimer. The_Sub will run every 10 seconds.
finish by running StopTimer.


--
Gary''s Student - gsnu200801


"Paul Moles" wrote:

I am trying to use an Excel worksheet as a backdrop to a rolling Powerpoint
presentation. Their is no human intervention with the sheet or the
presentation once it is running.

I need a macro to recalcualate the sheet every few seconds or at least once
a minute to keep the presentation updated.

The links all work, (Excel highlighted cells, Copy, Powerpoint, Paste
special link) it is just the sheet update I need.

The sheet will be running in the background and the macro could be manually
started or an autorun when the workbook is opened.

Many Thanks

Paul Moles