ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Continuous Time/Date Updates (https://www.excelbanter.com/excel-programming/280086-continuous-time-date-updates.html)

Bill Lanier

Continuous Time/Date Updates
 
Is there a way to get the time and date updated in a cell
continuously at a given interval (eg: each minute)?

Paul D[_2_]

Continuous Time/Date Updates
 
This may not be the best way, but it does work. Insert this code into a
module then run UpdateTime
Modify the cell address and format to what you need

Sub UpdateTime()
Application.OnTime Now + TimeValue("00:01:00"), procedu="InsertTime"
End Sub

Private Sub InsertTime()
Cells(1, 1).Value = Now
UpdateTime
End Sub

Paul D

"Bill Lanier" wrote in message
...
Is there a way to get the time and date updated in a cell
continuously at a given interval (eg: each minute)?





All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com