Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default macro to recalculate every 10 seconds

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 896
Default macro to recalculate every 10 seconds

see Chip Pearson's examples at
http://www.cpearson.com/excel/TimedClose.htm

one possible solution might be to use those 2 macros (tested in Excel
2003 and they worked)

Sub delay()
runwhen = Now + TimeSerial(0, 0, 10)
Application.OnTime runwhen, "recount", , True
End Sub

Sub recount()
For i =1 to 100
Call delay
Calculate
Next i
End Sub
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro wait 30 seconds then Complete the Macro Vick Excel Discussion (Misc queries) 2 June 2nd 08 08:04 PM
MACRO ACTIVATED EVERY 5 SECONDS CC Excel Discussion (Misc queries) 1 May 4th 06 03:02 PM
Converting Julian Seconds with a macro to replace old seconds data Keldair Excel Discussion (Misc queries) 2 February 18th 06 12:09 AM
Convert "Time Interval" in "hours : minutes : seconds" to seconds Ianukotnorth New Users to Excel 7 May 8th 05 08:11 PM
Can you make excel automatically recalculate every x seconds? ADW Excel Discussion (Misc queries) 0 February 17th 05 11:41 PM


All times are GMT +1. The time now is 01:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"