Continuous calculation of a formula.

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!
 
S

Shane Devenshire

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top