Results 1 to 2 of 2
Thread: Displaying Real Time in Excel
2001-06-07, 17:01 #1PTCGuest
Displaying Real Time in Excel
OK firstly I'm not an excel expert so gently please. What I'd like to do is to display a real time clock in a Excel (97) cell an be able to carry out simple calculations using the time which would update data accordingly. I realise this could be processor intensive so I'd like to be able to change the "sensitivity" so that time changed every say 30 secs.
Is this easily achieved can I link to the Windows clock via DDE ?
Any help much apprecated......
2001-06-07, 17:30 #2
- Join Date
- Jan 2001
- South Carolina, USA
- Thanked 0 Times in 0 Posts
Re: Displaying Real Time in Excel
You can do this by writing a VBA routines similar to the following:
<pre>Public Sub UpdateClock()
Sheet1.Range("A1") = Format(Time(), "h:mm:ss")
Application.OnTime Now() + TimeValue("00:00:30"), "UpdateClock"
Once started, that routine will update a time display in A1 on Sheet1 every 30 seconds. If you want the clock to start automatically when the workbook is opened, then you can call this routine in the WorkbookOpen event routine.Legare Coleman