Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a 2007 Excel worksheet that uses time that is updated to get
information for other cells. Rather than continuously hit the F9 key. I would like to set an automatic refresh every 20 seconds or so. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Insert the following in a standard module:
Public RunWhen As Double Public Const cRunIntervalSeconds = 20 Public Const cRunWhat = "The_Sub" Public Const a = "a" Sub StartTimer() RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds) Application.OnTime earliesttime:=RunWhen, procedu=cRunWhat, _ schedule:=True End Sub Sub The_Sub() Calculate StartTimer End Sub Sub StopTimer() On Error Resume Next Application.OnTime earliesttime:=RunWhen, _ procedu=cRunWhat, schedule:=False End Sub and then run the StartTimer macro. -- Gary''s Student - gsnu200789 "Dan" wrote: I have a 2007 Excel worksheet that uses time that is updated to get information for other cells. Rather than continuously hit the F9 key. I would like to set an automatic refresh every 20 seconds or so. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thank you so much....Works perfectly....
"Gary''s Student" wrote: Insert the following in a standard module: Public RunWhen As Double Public Const cRunIntervalSeconds = 20 Public Const cRunWhat = "The_Sub" Public Const a = "a" Sub StartTimer() RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds) Application.OnTime earliesttime:=RunWhen, procedu=cRunWhat, _ schedule:=True End Sub Sub The_Sub() Calculate StartTimer End Sub Sub StopTimer() On Error Resume Next Application.OnTime earliesttime:=RunWhen, _ procedu=cRunWhat, schedule:=False End Sub and then run the StartTimer macro. -- Gary''s Student - gsnu200789 "Dan" wrote: I have a 2007 Excel worksheet that uses time that is updated to get information for other cells. Rather than continuously hit the F9 key. I would like to set an automatic refresh every 20 seconds or so. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
YOU answered my dilema perfectly, Thank you.
"Gary''s Student" wrote: Insert the following in a standard module: Public RunWhen As Double Public Const cRunIntervalSeconds = 20 Public Const cRunWhat = "The_Sub" Public Const a = "a" Sub StartTimer() RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds) Application.OnTime earliesttime:=RunWhen, procedu=cRunWhat, _ schedule:=True End Sub Sub The_Sub() Calculate StartTimer End Sub Sub StopTimer() On Error Resume Next Application.OnTime earliesttime:=RunWhen, _ procedu=cRunWhat, schedule:=False End Sub and then run the StartTimer macro. -- Gary''s Student - gsnu200789 "Dan" wrote: I have a 2007 Excel worksheet that uses time that is updated to get information for other cells. Rather than continuously hit the F9 key. I would like to set an automatic refresh every 20 seconds or so. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Glad to help. Have a good weekend!!
-- Gary''s Student - gsnu200789 "Dan" wrote: YOU answered my dilema perfectly, Thank you. "Gary''s Student" wrote: Insert the following in a standard module: Public RunWhen As Double Public Const cRunIntervalSeconds = 20 Public Const cRunWhat = "The_Sub" Public Const a = "a" Sub StartTimer() RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds) Application.OnTime earliesttime:=RunWhen, procedu=cRunWhat, _ schedule:=True End Sub Sub The_Sub() Calculate StartTimer End Sub Sub StopTimer() On Error Resume Next Application.OnTime earliesttime:=RunWhen, _ procedu=cRunWhat, schedule:=False End Sub and then run the StartTimer macro. -- Gary''s Student - gsnu200789 "Dan" wrote: I have a 2007 Excel worksheet that uses time that is updated to get information for other cells. Rather than continuously hit the F9 key. I would like to set an automatic refresh every 20 seconds or so. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data import from different excel files & automatic refresh | Excel Discussion (Misc queries) | |||
Create refresh button in worksheet to refresh Pivot Table Data | Excel Worksheet Functions | |||
How can I 'Enable Automatic Refresh' for Query Refresh by default | Setting up and Configuration of Excel | |||
Automatic refresh (F9) in excel ???? | New Users to Excel | |||
Query Refresh-Enable Automatic Refresh Dialogue Box | Excel Discussion (Misc queries) |