Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Save
I am running some very long macros which get interrupted by auto save which
I have enabled. Is there a way to disable auto save from within the macro and then re-enable it before exiting the macro? Since I share macros with others at work, I probably should check to see if auto save is enabled first. Thanks in advance for your help! Ray |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Save
Ray,
AddIns("AutoSave").Installed = False .... Do Stuff .... AddIns("AutoSave").Installed = True It's untested.. Please let me know if this works? Rob "Ray Batig" wrote in message hlink.net... I am running some very long macros which get interrupted by auto save which I have enabled. Is there a way to disable auto save from within the macro and then re-enable it before exiting the macro? Since I share macros with others at work, I probably should check to see if auto save is enabled first. Thanks in advance for your help! Ray |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Save
Seems like the below code will work with Excel97, but don't think it will
work with Version 2002 or greater. If you're running the more recent versions, I think you will need to use the following. application.autorecover.enabled=false do stuff application.autorecover.enabled=true If however, you'd like to check the status of the users autorecover so you can leave it in the same status as the user had been running, then try this. 'create variable dim strAutoRecover as string 'assign value for variable strAutoRecover=application.autorecover.enabled application.autorecover.enabled=false 'insure AutoRecover _ is disabled. do stuff application.autorecover.enabled=strAutoRecover 'set AutoRecover _ back the way user had it. Let me know if this helped. D.S. "Rob van Gelder" wrote in message ... Ray, AddIns("AutoSave").Installed = False ... Do Stuff ... AddIns("AutoSave").Installed = True It's untested.. Please let me know if this works? Rob "Ray Batig" wrote in message hlink.net... I am running some very long macros which get interrupted by auto save which I have enabled. Is there a way to disable auto save from within the macro and then re-enable it before exiting the macro? Since I share macros with others at work, I probably should check to see if auto save is enabled first. Thanks in advance for your help! Ray |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Save
Hi Rob,
After building a test sheet with the VBA code, I tried to stop AutoSave and got a subscript out of range error. I will keep trying. Thanks Rob van Gelder wrote in message ... Ray, AddIns("AutoSave").Installed = False ... Do Stuff ... AddIns("AutoSave").Installed = True It's untested.. Please let me know if this works? Rob "Ray Batig" wrote in message hlink.net... I am running some very long macros which get interrupted by auto save which I have enabled. Is there a way to disable auto save from within the macro and then re-enable it before exiting the macro? Since I share macros with others at work, I probably should check to see if auto save is enabled first. Thanks in advance for your help! Ray |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Save
Sometimes it's easier to search google:
I found this post by Jim Rech: http://groups.google.com/groups?thre...%40cppssbbsa04 Oh, heck. It's pretty short: Assuming your question is, given that the Autosave add-in is open how do I programmatically enable and disable it, there is nothing documented on that as far as I know. The following are some macros that I hacked out several years ago that seem to do the job. Fwiw: Sub EnableAutosave() ToggleAutoSave True End Sub Sub DisableAutosave() ToggleAutoSave False End Sub Sub ToggleAutoSave(Setting As Boolean) Workbooks("autosave.xla").Excel4IntlMacroSheets("L oc Table") _ .Range("ud01n.Do_Save").Value = Setting Run "autosave.xla!mcs05.ClearOnTime" Run "autosave.xla!mcs03.SetOnTime" Run "autosave.xla!mcs01.CheckCommand" End Sub -- Jim Rech Excel MVP Ray Batig wrote: Hi Rob, After building a test sheet with the VBA code, I tried to stop AutoSave and got a subscript out of range error. I will keep trying. Thanks Rob van Gelder wrote in message ... Ray, AddIns("AutoSave").Installed = False ... Do Stuff ... AddIns("AutoSave").Installed = True It's untested.. Please let me know if this works? Rob "Ray Batig" wrote in message hlink.net... I am running some very long macros which get interrupted by auto save which I have enabled. Is there a way to disable auto save from within the macro and then re-enable it before exiting the macro? Since I share macros with others at work, I probably should check to see if auto save is enabled first. Thanks in advance for your help! Ray -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Save
Thanks very much. Works.
Dave Peterson wrote in message ... Sometimes it's easier to search google: I found this post by Jim Rech: http://groups.google.com/groups?thre...%40cppssbbsa04 Oh, heck. It's pretty short: Assuming your question is, given that the Autosave add-in is open how do I programmatically enable and disable it, there is nothing documented on that as far as I know. The following are some macros that I hacked out several years ago that seem to do the job. Fwiw: Sub EnableAutosave() ToggleAutoSave True End Sub Sub DisableAutosave() ToggleAutoSave False End Sub Sub ToggleAutoSave(Setting As Boolean) Workbooks("autosave.xla").Excel4IntlMacroSheets("L oc Table") _ .Range("ud01n.Do_Save").Value = Setting Run "autosave.xla!mcs05.ClearOnTime" Run "autosave.xla!mcs03.SetOnTime" Run "autosave.xla!mcs01.CheckCommand" End Sub -- Jim Rech Excel MVP Ray Batig wrote: Hi Rob, After building a test sheet with the VBA code, I tried to stop AutoSave and got a subscript out of range error. I will keep trying. Thanks Rob van Gelder wrote in message ... Ray, AddIns("AutoSave").Installed = False ... Do Stuff ... AddIns("AutoSave").Installed = True It's untested.. Please let me know if this works? Rob "Ray Batig" wrote in message hlink.net... I am running some very long macros which get interrupted by auto save which I have enabled. Is there a way to disable auto save from within the macro and then re-enable it before exiting the macro? Since I share macros with others at work, I probably should check to see if auto save is enabled first. Thanks in advance for your help! Ray -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
auto save feature (not auto recovery) | Excel Discussion (Misc queries) | |||
Auto save??? | Excel Discussion (Misc queries) | |||
Auto-Save | Excel Discussion (Misc queries) | |||
Excel 2007 auto-recovery / auto-save? | Setting up and Configuration of Excel | |||
How to AUTO SAVE as opposed to turning on auto recovery: EXCEL | Excel Discussion (Misc queries) |