Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Refesh time
Is there anyway to have an excel file up and have it automatically refresh
the file so that the time gets updated every minute? Thanks Lorri |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Refesh time
Add this procedures
Public nTime as double Public Sub ShowTime() Worksheets("Sheet1").Range("A1").Value = Format(Time, "hh:mm:ss") nTime = Now + TimeSerial(0, 0, 1) Application.OnTime nTime, "ShowTime" End Sub and run it. You need to stop it also Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.OnTime ntime, "ShowTime", , False End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... Is there anyway to have an excel file up and have it automatically refresh the file so that the time gets updated every minute? Thanks Lorri |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Refesh time
Thanks - So I just enter this in - go back to the file and it should
automatically refresh the file every minute to update the time while I have the file open? "Bob Phillips" wrote: Add this procedures Public nTime as double Public Sub ShowTime() Worksheets("Sheet1").Range("A1").Value = Format(Time, "hh:mm:ss") nTime = Now + TimeSerial(0, 0, 1) Application.OnTime nTime, "ShowTime" End Sub and run it. You need to stop it also Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.OnTime ntime, "ShowTime", , False End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... Is there anyway to have an excel file up and have it automatically refresh the file so that the time gets updated every minute? Thanks Lorri |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Refesh time
Not quite, you will need to launch it, ToolsMacroMacros..., select
ShowTime and run it. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... Thanks - So I just enter this in - go back to the file and it should automatically refresh the file every minute to update the time while I have the file open? "Bob Phillips" wrote: Add this procedures Public nTime as double Public Sub ShowTime() Worksheets("Sheet1").Range("A1").Value = Format(Time, "hh:mm:ss") nTime = Now + TimeSerial(0, 0, 1) Application.OnTime nTime, "ShowTime" End Sub and run it. You need to stop it also Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.OnTime ntime, "ShowTime", , False End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... Is there anyway to have an excel file up and have it automatically refresh the file so that the time gets updated every minute? Thanks Lorri |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Refesh time
So there is no way to have the file up - like a schedule and have it update
the time every minute to do a conditional format? I apprecaite the feedback "Bob Phillips" wrote: Not quite, you will need to launch it, ToolsMacroMacros..., select ShowTime and run it. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... Thanks - So I just enter this in - go back to the file and it should automatically refresh the file every minute to update the time while I have the file open? "Bob Phillips" wrote: Add this procedures Public nTime as double Public Sub ShowTime() Worksheets("Sheet1").Range("A1").Value = Format(Time, "hh:mm:ss") nTime = Now + TimeSerial(0, 0, 1) Application.OnTime nTime, "ShowTime" End Sub and run it. You need to stop it also Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.OnTime ntime, "ShowTime", , False End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... Is there anyway to have an excel file up and have it automatically refresh the file so that the time gets updated every minute? Thanks Lorri |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Refesh time
Yeah, add a workbook open procedure
Private Sub Workbook_Open() ShowTime End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... So there is no way to have the file up - like a schedule and have it update the time every minute to do a conditional format? I apprecaite the feedback "Bob Phillips" wrote: Not quite, you will need to launch it, ToolsMacroMacros..., select ShowTime and run it. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... Thanks - So I just enter this in - go back to the file and it should automatically refresh the file every minute to update the time while I have the file open? "Bob Phillips" wrote: Add this procedures Public nTime as double Public Sub ShowTime() Worksheets("Sheet1").Range("A1").Value = Format(Time, "hh:mm:ss") nTime = Now + TimeSerial(0, 0, 1) Application.OnTime nTime, "ShowTime" End Sub and run it. You need to stop it also Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.OnTime ntime, "ShowTime", , False End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... Is there anyway to have an excel file up and have it automatically refresh the file so that the time gets updated every minute? Thanks Lorri |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Refesh time
Thanks Bob- I am having issues though - How do I get this to run? I can input
it fine but it is not updating anything. I follow the instructions you gave me and then just X out of the screen to go back to the file, but then what? Am I missing something? "Bob Phillips" wrote: Yeah, add a workbook open procedure Private Sub Workbook_Open() ShowTime End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... So there is no way to have the file up - like a schedule and have it update the time every minute to do a conditional format? I apprecaite the feedback "Bob Phillips" wrote: Not quite, you will need to launch it, ToolsMacroMacros..., select ShowTime and run it. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... Thanks - So I just enter this in - go back to the file and it should automatically refresh the file every minute to update the time while I have the file open? "Bob Phillips" wrote: Add this procedures Public nTime as double Public Sub ShowTime() Worksheets("Sheet1").Range("A1").Value = Format(Time, "hh:mm:ss") nTime = Now + TimeSerial(0, 0, 1) Application.OnTime nTime, "ShowTime" End Sub and run it. You need to stop it also Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.OnTime ntime, "ShowTime", , False End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... Is there anyway to have an excel file up and have it automatically refresh the file so that the time gets updated every minute? Thanks Lorri |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Refesh time
Then save the workbook, close it and open it again, it should all start.
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... Thanks Bob- I am having issues though - How do I get this to run? I can input it fine but it is not updating anything. I follow the instructions you gave me and then just X out of the screen to go back to the file, but then what? Am I missing something? "Bob Phillips" wrote: Yeah, add a workbook open procedure Private Sub Workbook_Open() ShowTime End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... So there is no way to have the file up - like a schedule and have it update the time every minute to do a conditional format? I apprecaite the feedback "Bob Phillips" wrote: Not quite, you will need to launch it, ToolsMacroMacros..., select ShowTime and run it. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... Thanks - So I just enter this in - go back to the file and it should automatically refresh the file every minute to update the time while I have the file open? "Bob Phillips" wrote: Add this procedures Public nTime as double Public Sub ShowTime() Worksheets("Sheet1").Range("A1").Value = Format(Time, "hh:mm:ss") nTime = Now + TimeSerial(0, 0, 1) Application.OnTime nTime, "ShowTime" End Sub and run it. You need to stop it also Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.OnTime ntime, "ShowTime", , False End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Lorri" wrote in message ... Is there anyway to have an excel file up and have it automatically refresh the file so that the time gets updated every minute? Thanks Lorri |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
formula to determine time range overlap? | Excel Discussion (Misc queries) | |||
Hot key for time? | Excel Worksheet Functions | |||
time sheet drop down lists | Excel Discussion (Misc queries) | |||
Entering Times | Excel Discussion (Misc queries) | |||
time differences in a column | Excel Worksheet Functions |