Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Timer for auto shut down

Iam using a macro as follows

Sub Timer()
Application.OnTime Now + TimeValue("00:10:00"), "savequit"
end Sub

I auto_open this and was trying to re-activate it with other macros
that are used in the spreadsheet so as long as there was activity the
above timer would be reset to the original TimeValue but it doesn't
work. Is there any way that the above timer can be reset with
different macros or a way to determine if there is no activity after a
predetermined amount of time that the spreadsheet saves itself and
closes the application.

Thank You in Advance
Randy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Timer for auto shut down

See Chip Pearson's page on Application.Ontime for an approach and sample
code:

http://www.cpearson.com/excel/ontime.htm

--
Regards,
Tom Ogilvy

"Randy" wrote in message
om...
Iam using a macro as follows

Sub Timer()
Application.OnTime Now + TimeValue("00:10:00"), "savequit"
end Sub

I auto_open this and was trying to re-activate it with other macros
that are used in the spreadsheet so as long as there was activity the
above timer would be reset to the original TimeValue but it doesn't
work. Is there any way that the above timer can be reset with
different macros or a way to determine if there is no activity after a
predetermined amount of time that the spreadsheet saves itself and
closes the application.

Thank You in Advance
Randy



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
Shut off web links? Bob Newman Excel Discussion (Misc queries) 2 September 6th 09 04:22 AM
Ignoring code to shut a workbook if it is already shut Cammy Excel Discussion (Misc queries) 1 September 12th 06 06:12 PM
Stopping a Timer / Running a timer simultaneously on Excel Paul23 Excel Discussion (Misc queries) 1 March 10th 06 12:08 PM
GETPIVOTDATA -- How do I shut it OFF! besbaum Excel Worksheet Functions 1 July 13th 05 09:23 PM
Shut down excel Greg B Excel Discussion (Misc queries) 1 April 26th 05 07:05 AM


All times are GMT +1. The time now is 02:24 AM.

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"