I'm trying to turn off the autosave function for my excel document (Excel 365 while saving the file on OneDrive):
Doing a little research AutoRecover.Enabled = False
(Application.
) should be the right attribute but for some reason I can't get it to work. I don't get an error message, but the AutoSave Function does not turn off.
No luck with different objects (myWorkbook.AutoRecover.Enabled = False
, etc.) either. Any Ideas what the problem might be?
If you want to turn AutoSave off, by default, for all files, go to File > Options > Save and uncheck the box next to AutoSave OneDrive and SharePoint Online files by default on <application>.
This code checks whether autosave in Excel 365 is on and, if so, turns it off. It displays messages indicating the status before and after the change.
Note: The below code only works for office 365 subscribers and in Excel 2016 or later
Sub ChkAutoSv()
Dim AutoSv As Boolean
If Val(Application.Version) > 15 Then
AutoSv = ActiveWorkbook.AutoSaveOn
MsgBox "AutoSave set to: " & AutoSv
If AutoSv Then ActiveWorkbook.AutoSaveOn = False
AutoSv = ActiveWorkbook.AutoSaveOn
MsgBox "AutoSave now set to: " & AutoSv
End If
End Sub
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With