#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default 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
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
formula to determine time range overlap? William DeLeo Excel Discussion (Misc queries) 0 June 6th 06 08:26 PM
Hot key for time? Dave in Des Moines Excel Worksheet Functions 2 March 24th 06 04:15 PM
time sheet drop down lists Steve Excel Discussion (Misc queries) 12 March 18th 06 10:30 PM
Entering Times Denise Excel Discussion (Misc queries) 9 November 15th 05 04:57 PM
time differences in a column 68magnolia71 Excel Worksheet Functions 3 May 9th 05 09:46 PM


All times are GMT +1. The time now is 12:11 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"