Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Refresh Time


Hey all, I want to have a running Time Stamp in Cell A1

I've tried =NOW() and once the time changes it doesn't update less
save, and reopen. I know this is a very basic question, but i was tol
it had to do with macros. If anyone knows, it would help me out greatl

--
klick_8
-----------------------------------------------------------------------
klick_80's Profile: http://www.excelforum.com/member.php...fo&userid=3620
View this thread: http://www.excelforum.com/showthread.php?threadid=55993

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Auto Refresh Time

I not an expert in reading these codes yet, so one simple question: How often
does this code refresh the data? And how do I set the refresh frequency to
ex. 1 sek or 1 minute?
--
Thanks


"Ardus Petus" wrote:

Paste the folllowing in a standard module:
'---------------------------------------
Option Explicit

Dim dTimer As Date

Sub initTimer()
Range("A1").Value = Now
dTimer = Now + TimeSerial(0, 0, 1)
Application.OnTime dTimer, "InitTimer"
End Sub

Sub stopTimer()
Application.OnTime dTimer, "InitTimer", , False
End Sub
'----------------------------------------

and the following in ThisWorkbook code:
'-------------------------------------------
Option Explicit

Private Sub Workbook_BeforeClose(Cancel As Boolean)
stopTimer
End Sub

Private Sub Workbook_Open()
initTimer
End Sub
'--------------------------------------------

HTH
--
AP


"klick_80" a écrit
dans le message de news:
...

Hey all, I want to have a running Time Stamp in Cell A1

I've tried =NOW() and once the time changes it doesn't update less I
save, and reopen. I know this is a very basic question, but i was told
it had to do with macros. If anyone knows, it would help me out greatly


--
klick_80
------------------------------------------------------------------------
klick_80's Profile:
http://www.excelforum.com/member.php...o&userid=36208
View this thread: http://www.excelforum.com/showthread...hreadid=559938




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Auto Refresh Time

Sorry, I can get this code to work. Nothing happens. I have put the code in
the two different places: Module 1 and This workbok. What's wrong?
--
Thanks


"zzxxcc" wrote:

I not an expert in reading these codes yet, so one simple question: How often
does this code refresh the data? And how do I set the refresh frequency to
ex. 1 sek or 1 minute?
--
Thanks


"Ardus Petus" wrote:

Paste the folllowing in a standard module:
'---------------------------------------
Option Explicit

Dim dTimer As Date

Sub initTimer()
Range("A1").Value = Now
dTimer = Now + TimeSerial(0, 0, 1)
Application.OnTime dTimer, "InitTimer"
End Sub

Sub stopTimer()
Application.OnTime dTimer, "InitTimer", , False
End Sub
'----------------------------------------

and the following in ThisWorkbook code:
'-------------------------------------------
Option Explicit

Private Sub Workbook_BeforeClose(Cancel As Boolean)
stopTimer
End Sub

Private Sub Workbook_Open()
initTimer
End Sub
'--------------------------------------------

HTH
--
AP


"klick_80" a écrit
dans le message de news:
...

Hey all, I want to have a running Time Stamp in Cell A1

I've tried =NOW() and once the time changes it doesn't update less I
save, and reopen. I know this is a very basic question, but i was told
it had to do with macros. If anyone knows, it would help me out greatly


--
klick_80
------------------------------------------------------------------------
klick_80's Profile:
http://www.excelforum.com/member.php...o&userid=36208
View this thread: http://www.excelforum.com/showthread...hreadid=559938




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,069
Default Auto Refresh Time

I have a workbook created by Bob Phillips which is a demo of exactly the kind
of continuous background time display you describe. It uses API calls.
Unforunately, I don't remember the URL where I downloaded it. The file's name
is "Interactive Clock v5.1.xls" Bob Phillips is a big name on these forums,
so it may not be hard to find his website & and the file. Otherwise, I am
happy to e-mail it to you.

Regards,

Hutch

"klick_80" wrote:


Hey all, I want to have a running Time Stamp in Cell A1

I've tried =NOW() and once the time changes it doesn't update less I
save, and reopen. I know this is a very basic question, but i was told
it had to do with macros. If anyone knows, it would help me out greatly


--
klick_80
------------------------------------------------------------------------
klick_80's Profile: http://www.excelforum.com/member.php...o&userid=36208
View this thread: http://www.excelforum.com/showthread...hreadid=559938


Reply
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Excel functions formula and auto refresh refresh Pauline Cheong Excel Worksheet Functions 3 February 16th 09 01:23 AM
How can I auto refresh a column that has an auto filter in place Pastal Excel Discussion (Misc queries) 1 December 18th 07 11:43 AM
Auto Refresh Time klick_80[_2_] Excel Programming 0 July 10th 06 04:23 PM
Auto Refresh Time klick_80 Excel Programming 0 July 10th 06 04:21 PM
Auto-run macro after auto-query refresh (Excel2000,sr1) Bill Cufflin Excel Programming 3 June 29th 06 03:30 AM


All times are GMT +1. The time now is 11:52 PM.

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

About Us

"It's about Microsoft Excel"