Continuous calculation of a formula.

  • Thread starter Thread starter Husker87
  • Start date Start date
H

Husker87

I created a “Countdown†clock to an event in our company. Just the actual
date minus today’s date. Anyway, it just calculates days, hours, mins, secs
until an event. The problem is that you either have to hit F9 or some other
cell to get it to re-calculate the formulas. I set up a macro and tied it to
a “refresh†button but does anyone know how I could get the spreadsheet to
calculate every second automatically or perhaps another way to add a
“Countdown clock†to my spreadsheet?
Thanks!
 
Hi,

Don't you already have an answer on this one? Anyway,

A repeating sub routine
==========================

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

Sub my_Procedure()
Application.OnTime Now + TimeValue("00:00:01"), "my_Procedure"
ActiveSheet.Calculate
End Sub

Put these into the thisWorkbook object of the VBA editor. It will start
when you open the workbook.
 
Back
Top