Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I alter this AutoSave code?
There is a workbook used by many different users in my department. We
encounter a problem when someone opens the workbook and then forgets to close it. To eliminate this problem, I wrote in some code that automatically closes the workbook after it has been open for 20 minutes. The procedure works fine but I have a glitch. I (and I'm assuming others as well) run AutoSave (set to prompt before saving). The problem occurs when the autosave promt comes up and I don't respond to the prompt. When this happens, the procedure I wrote is suspended until I respond to the prompt. The following code runs the autosave. Application.Run Range("AUTOSAVE.XLA!mcs02.OnTime") Can I do something to surpress this line when the workbook is opened or when this line attempts to run? - Also, it would work better if I could set the workbook to close if the window for that workbook has been inactive for 3 minutes instead of automatically after 20 minutes. Can anyone suggest something I could use for that? any suggestions are appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I alter this AutoSave code?
You could try placing application.displayalerts = false before calling
autosave. Make sure to turn it back on afterwards. -- JNW "ed" wrote: There is a workbook used by many different users in my department. We encounter a problem when someone opens the workbook and then forgets to close it. To eliminate this problem, I wrote in some code that automatically closes the workbook after it has been open for 20 minutes. The procedure works fine but I have a glitch. I (and I'm assuming others as well) run AutoSave (set to prompt before saving). The problem occurs when the autosave promt comes up and I don't respond to the prompt. When this happens, the procedure I wrote is suspended until I respond to the prompt. The following code runs the autosave. Application.Run Range("AUTOSAVE.XLA!mcs02.OnTime") Can I do something to surpress this line when the workbook is opened or when this line attempts to run? - Also, it would work better if I could set the workbook to close if the window for that workbook has been inactive for 3 minutes instead of automatically after 20 minutes. Can anyone suggest something I could use for that? any suggestions are appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
alter code to apply to range (links cells w/ row insertions) | Excel Discussion (Misc queries) | |||
Alter pivot with code | Excel Discussion (Misc queries) | |||
macro to alter worksheet code | Excel Programming | |||
Help to alter code slightly | Excel Programming | |||
Alter existing code | Excel Programming |