Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy Excel functions formula and auto refresh refresh | Excel Worksheet Functions | |||
How can I auto refresh a column that has an auto filter in place | Excel Discussion (Misc queries) | |||
Auto Refresh Time | Excel Programming | |||
Auto Refresh Time | Excel Programming | |||
Auto-run macro after auto-query refresh (Excel2000,sr1) | Excel Programming |