Thread: Timer
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tushar Mehta Tushar Mehta is offline
external usenet poster
 
Posts: 1,071
Default Timer

You would have to use a programmatic solution. Put the following in a
standard VBA module.

Option Explicit

Dim NextTime As Date
Sub RepeatOneSec()
Application.Calculate
NextTime = Now() + TimeSerial(0, 0, 1)
Application.OnTime NextTime, "RepeatOneSec"
End Sub
Sub EndProcess()
Application.OnTime NextTime, "RepeatOneSec", , False
End Sub

Change the TimeSerial() parameters to suit. Currently, it updates the
XL environment every second.

Once done, run the RepeatOneSec macro. Run the EndProcess macro to stop
the automatic updates.

--
Regards,

Tushar Mehta
MS MVP Excel 2000-2003
www.tushar-mehta.com
Excel, PowerPoint, and VBA tutorials and add-ins
Custom Productivity Solutions leveraging MS Office


In article ,
says...
Hi,

A cell displays the current date and time, which does not refresh if nothing
is done.

How can I arrange for the cell to be up-dated automatically at set intervals
e.g. every minute.

Don

--