Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
qaf qaf is offline
external usenet poster
 
Posts: 3
Default How do I calculate at timed intervals?

I want to perform calculations at timed intervals. I wrote the
following macro:

Public Function CalcNow(CurTime As Date) As Boolean
Static bInitialized As Boolean
Static StartTime As Date, EndTime As Date
Dim TimeDiff As Double

If Not bInitialized Then
StartTime = Now()
EndTime = Now()
bInitialized = True
End If
EndTime = Now()
TimeDiff = (EndTime - StartTime) * 86400
If TimeDiff 5 Then
Application.Calculate
StartTime = Now()
End If
End Function

The current time is in cell A1 and I pass that value to trigger the
running of the function every second - BUT since I am in manual
calculation mode, cell A1 does not update - UGH!!

Any suggestions are appreciated.
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
How do I calculate spreadsheet at five minute intervals Mel T ID Excel Discussion (Misc queries) 2 February 11th 09 10:21 PM
Using Excel to calculate future dates with various intervals MH Excel Worksheet Functions 6 January 3rd 09 05:17 AM
Looking for a formula to calculate date intervals Sandy - PEAK ASSIST Excel Worksheet Functions 4 September 14th 06 07:09 AM
Creating Formulas In Excel To Calculate Time Intervals TonyR Excel Worksheet Functions 1 November 14th 05 04:52 PM
How can I automate a macro to run in timed intervals Randc Excel Programming 2 July 26th 05 06:57 PM


All times are GMT +1. The time now is 02:55 AM.

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

About Us

"It's about Microsoft Excel"