Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how i open another sheet in the same workbook without closing? | Excel Discussion (Misc queries) | |||
Warning upon closing sheet | Excel Worksheet Functions | |||
Excel 2007 - Closing One Sheet at a Time? | Excel Discussion (Misc queries) | |||
Closing the current focused sheet | Excel Discussion (Misc queries) | |||
closing 1 file at a time | Excel Discussion (Misc queries) |