• 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.

clock

You can add


=Today() to a cell to display the Date

or

=Now() to display the Date and Time


If you just want the Time =Now() and apply a Custom Number Format of say HH:MM:SS etc


To update press F9
 
If you add

B2: =Today()

B3: =Now()

and format those as appropriate


Then in VBA add a Code Module

[pre]
Code:
Sub Show_Time()
Worksheets("Sheet1").Range("B2:B3").Calculate
Application.OnTime Now + TimeSerial(0, 1, 0), "Show_Time" 'Update every minute
End Sub

and on the Workbook Object add


Private Sub Workbook_Open()
Application.OnTime Now + TimeSerial(0, 1, 0), "Show_Time" 'Update every minute
End Sub
[/pre]
That will update just those 2 cells every minute

Asdjust the Cells and Time to suit
 
Thanks Hui,

I amended your code to enable the clock to update every second.

It worked well

Thank you again.
 
Back
Top