Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Close A Workbook...With Two Twists!

I would like a way to auto close a workbook after a specified time o
inactivity, (I actually know how to do that part) however, I (like man
others I found while searching for a way to solve my problem) a
concerned about the saving of the file when closing.

What I mean is...
If I have the file auto close and save changes and the user was workin
on something and made an error then the error would be saved (also sinc
I have my save in Workbook_BeforeClose it saves anytime the file i
closed). Next if I set it up so the file doesn't save changes and the
the user would lose all their work. Neither of those are acceptable i
my situation!

Here is how I would like to resolve this problem:
I would like for the auto close to ask the user if they wish to save o
discard changes, that way if they manually close the file due to a hug
mistake (which many of us do!) then they have the option to not save.
You might wonder why have an auto close if it is going to ask
question and require an input; this is where the first twist comes in!
I would like the question to be on a timer so if a response in no
selected within 30 seconds or so, the file will be saved and closed.
Also I would like to have Excel close if no other workbooks are open!

The next twist is... (This is the big trick)
I also have my workbook_BeforeClose hiding all sheets but a cover shee
(xlVeryHidden) when the file is closed to protect sensitive data if th
file is opened next time with macros disabled. This means the workboo
must be saved after this is done! Is there a way to have excel discar
changes since the last save (Incase of manual close and selecting no
to save) and the save the file at the end of the Workbook_BeforeClos
Sub. This way the changes would be discarded but the file would stil
be saved with all sheets but the cover hidden. This would ensure th
integrity of the data the next time the file is opened!

I know this is a tall order, I think it can be done but it is way ove
my head right now!

Thanks for looking,
Jef

--
Message posted from http://www.ExcelForum.com

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
Auto-Close Office User Excel Discussion (Misc queries) 2 April 12th 10 10:01 PM
auto close workbook [email protected] uk Excel Discussion (Misc queries) 2 December 6th 09 09:02 PM
Auto close userform AOU Excel Discussion (Misc queries) 0 December 28th 06 06:54 PM
Close a the current workbook and load another specified workbook Adrian[_7_] Excel Programming 4 August 7th 04 05:29 PM
Auto Close buckle Excel Programming 4 August 19th 03 12:23 AM


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