Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto-Close | Excel Discussion (Misc queries) | |||
auto close workbook | Excel Discussion (Misc queries) | |||
Auto close userform | Excel Discussion (Misc queries) | |||
Close a the current workbook and load another specified workbook | Excel Programming | |||
Auto Close | Excel Programming |