Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default set time limit before closing sheet

Hello,

I have a xls-file used by several people and I wish this
file to be automatically closed after an hour.
Any suggestions?

Thanks, Maria

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default set time limit before closing sheet

Maria

Not sure how reliable this would be, it might have issues if a user is
editing a cell when the code runs, but this will shut down the workbook
after 1 hour from opening. The top code goes in the ThisWorkbook module and
the bottom code in standard module. Post back for help on placing this.

The first code fires when the workbook is opened which runs the second code
after 1 hour. It saves the workbook. You may wish to refine it by adding
warnings to users, etc!


Private Sub Workbook_Open()
Application.OnTime EarliestTime:=Now() + TimeValue("01:00"),
Procedu="ShutDown"
End Sub

Sub ShutDown()
ThisWorkbook.Close SaveChanges:=True
End Sub


--
HTH
Nick Hodge
Southampton, England



"Maria Johansson" wrote in message
...
Hello,

I have a xls-file used by several people and I wish this
file to be automatically closed after an hour.
Any suggestions?

Thanks, Maria



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default set time limit before closing sheet

Of course, there are ways to circumvent such schemes (such as diabling
macros), but here is a suggestion.

http://tinyurl.com/qu9r

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------
I have a xls-file used by several people and I wish this
file to be automatically closed after an hour.
Any suggestions?

Thanks, Maria


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
how i open another sheet in the same workbook without closing? kamrul Excel Discussion (Misc queries) 2 February 14th 09 08:31 AM
Warning upon closing sheet stevieboy1313 Excel Worksheet Functions 6 April 22nd 08 06:53 PM
Excel 2007 - Closing One Sheet at a Time? Charliec Excel Discussion (Misc queries) 4 October 22nd 07 01:13 PM
Closing the current focused sheet Pietro Excel Discussion (Misc queries) 3 February 22nd 07 11:15 PM
closing 1 file at a time Keith G Hicks Excel Discussion (Misc queries) 4 September 4th 05 02:16 AM


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