#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default 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
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 save feature (not auto recovery) Dawnee Excel Discussion (Misc queries) 3 January 20th 09 09:47 PM
Auto save??? doss04 Excel Discussion (Misc queries) 2 November 18th 08 08:01 AM
Auto-Save Warren Easton Excel Discussion (Misc queries) 8 August 15th 08 08:34 AM
Excel 2007 auto-recovery / auto-save? gpurdue Setting up and Configuration of Excel 0 May 23rd 08 10:19 PM
How to AUTO SAVE as opposed to turning on auto recovery: EXCEL T-mo Excel Discussion (Misc queries) 1 January 12th 06 10:16 PM


All times are GMT +1. The time now is 02:23 PM.

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"