How to disable all forms of autosave for a certain workbook.

Harvey

Well-known Member
Joined
Nov 18, 2004
Messages
953
Hi all,

I have ths problem:

Intro
I made an excel application that stores its data on the worksheet. When a user clicks save the data is exported to an xml-file. The application xls changes in the process, so excel tries to auto(save) it. I cannot have this happening. I do not want any messages pop up (this file is read only or cannot save), so I want to completely disable all kinds of autosave and autorecovery events.

Question
Can someone explain to me what autosave processes run during excel, and how to disable them. Note that other documents should autosave properly, even if they are opened at the same time as my workbook.

Other suggestions are welcome too, thanks in advance for any replies.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Harvey

Well-known Member
Joined
Nov 18, 2004
Messages
953
help me please, I have searched an read other topics but I'm not sure of how to turn it all off.
 

agihcam

Well-known Member
Joined
Jan 16, 2006
Messages
1,624
not sure what you're looking for. disable autosave from;
tools > add-ins > untick auto save add in
 

jindon

MrExcel MVP
Joined
Aug 21, 2004
Messages
16,995

ADVERTISEMENT

Not sure

If you are writing the code to Workbook_BeforeSave event

Cancel = True

is the code for not save.
 

Harvey

Well-known Member
Joined
Nov 18, 2004
Messages
953
thanks.

unfortunately, this does not cover everything. There seems to be some other autosave/autobackup procedure that I think I have to cancel too.
But I am not completely sure of how to do it and I don't exactly know what it really does either.

Do you know more about this one?

thanks for the help so far.
 

jindon

MrExcel MVP
Joined
Aug 21, 2004
Messages
16,995

ADVERTISEMENT

Re: How to disable all forms of autosave for a certain workb

Hi all,

I have ths problem:

Intro
I made an excel application that stores its data on the worksheet. When a user clicks save the data is exported to an xml-file. The application xls changes in the process, so excel tries to auto(save) it. I cannot have this happening. I do not want any messages pop up (this file is read only or cannot save), so I want to completely disable all kinds of autosave and autorecovery events.

I cannot think of any other than BeforeSave event for this action.

Or are you calling Sub procedure in the BeforeSave event code?
 

Harvey

Well-known Member
Joined
Nov 18, 2004
Messages
953
Hmm I can't find an article related to this right now, but what I mean is this:

If Excel crashes when you are working in it, and you restart, Excel has made some kind of backup file to restore your workbooks.

I want this function to be either disabled for my workbook or disabled as long as the workbook is open, preferably the first option.
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
Hi,

in the menu tools / options: TAB "Save" you can switch on and off this option
Code:
    ActiveWorkbook.EnableAutoRecover = False
it is workbookspecific which means you can put it to False for one workbook, while still having it running for the others (that's how I understand my experiments)

kind regards,
Erik
 

Harvey

Well-known Member
Joined
Nov 18, 2004
Messages
953
Hi,

Thanks Eric. This is what I needed.

Can you tell me if this two measures are enough to prevent auto saving of the workbook? The user itself can save it but that's no problem for me.
 

Forum statistics

Threads
1,137,063
Messages
5,679,399
Members
419,825
Latest member
MegastarMagus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top