Speadsheet advice please
Speadsheet advice please
Author
Discussion

lavingp

Original Poster:

883 posts

290 months

Wednesday 23rd October 2002
quotequote all
Can anyone tell me how I can display a clock in an Excel 97 spreadsheet cell. One that updates every second or minute would be OK. I also need to be able to use something like the NOW function to make the speadsheet recalculate every time the time changes
i.e. every second or every minute. Any ideas?
TIA

Paul.

thrust

88 posts

283 months

Wednesday 23rd October 2002
quotequote all
You'll probably have to use a VBA Macro. Look up the help for the Timer function, you can use it to trigger an event every so often (i.e every second or minute for a clock display). You'd have to trigger the macro on startup for it to work how I think you mean it to.

philipmog

24 posts

281 months

Wednesday 23rd October 2002
quotequote all
On the MS webb site are various links one of which takes you to an Excel forum,, try that..
As excel reads time in a code format, based on when the Pc was loaded... not hours, mins and seconds..

thrust

88 posts

283 months

Wednesday 23rd October 2002
quotequote all
Something like this should work.

Sub TimerExample()

Dim Finished As Boolean

Finished = False
Interval = 1

Do While Not Finished

StartTime = Timer
Do While Timer < StartTime + Interval
DoEvents ' let everything else do its stuff
Loop

'Update clock
'Do anything else you want to update regularly

'Set finished flag to True if you want to stop the timer routine
Loop

End Sub


>> Edited by thrust on Wednesday 23 October 12:17