Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default EXCEL

Hi,

It is possible but doing this has an overhead, updating this cell every
second may slow your workbook down. Try this. Alt + F11 to open VB editor.
Right click 'ThisWorkbook' and insert module and paste in the first 3 of the
modules below. The double click 'ThisWorkbook' and paste the fourth module
in. Start proceedings off by running the module Recalc()

Change the sheet & cell where you want this to appear

Dim UpDate As Date
Sub Recalc()
Sheets("Sheet1").Range("A1").Value = Sheets("Sheet1").Range("A1").Value + 1
Call UpDateTime
End Sub

Sub UpDateTime()
UpDate = Now + TimeValue("00:00:01")
Application.OnTime UpDate, "Recalc"
End Sub

Sub StopClock()
On Error Resume Next
Application.OnTime EarliestTime:=UpDate, Procedu="Recalc", Schedule:=False
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
StopClock
End Sub

Mike

"Nad" wrote:

Is it possible to set a value in a cell and then make it continuosly changing
say by adding a number every second etc.
For example, I want to start with a 1 in cell A1 and allow this to
automatically continue to change while the spreadsheet is opened.
Thanks

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"