• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Countdown Timer - live update in excel

Hi,

I have been able to get the countdown working, just that I have to log off and log in back to see the changes. Does excel have the functionality which displays the countdown as normally (digital) done during any major events.


Thanks in advance for your assistance.


regards

Arjun
 
Arjun

Welcome to the Chandoo.org forums

Can you post the code you have
 
Thank you Hui,


Rather simple, have put the date : 23/May/2011 18:00:00 in cell A1 and then Now() in cell B1 - Cell C1 = A1-B1


This gives me the result, I have to close the workbook everytime to see an update. Hope I have been able to explain what I have done.


Thank you once again for your help.


regards

Arjun
 
You can see the new time at any time by pressing F9

F9 is calculate and Now() will be updated
 
Arjun,


1. Create a new workbook

2. Press ALT+F11 to start the Visual Basic Editor

3. In the project explorer, double click on ThisWorkbook

4. In the code pane, paste the below code

[pre]
Code:
Private Sub Workbook_Open()
UpdateMyClock
End Sub

5. Insert a module... click in insert and the click on module

6. paste the below code


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

Sub my_Procedure()
Sheets("Sheet1").Range("A1").Value = Format(Now(), "hh:mm:ss")
UpdateMyClock
End Sub
[/pre]
This will update the clock in cell A1 every 1 second. Adjust as necessary as this code will be running every 1 second and if you are working on the workbook you may want to adjust the time interval to refresh the time.


~VijaySharma
 
Back
Top