Speadsheet advice please
Discussion
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.
i.e. every second or every minute. Any ideas?
TIA
Paul.
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
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
Gassing Station | General Gassing [Archive] | Top of Page | What's New | My Stuff


