VBA & Macro Problems

Disable Excel AutoSave in VBA for Office 2016 and 2013

Bushra ParveenBushra Parveen Nov 22, 2026 869 views

Question details

The user needs to disable workbook AutoSave from VBA where supported while keeping the macro compatible with Office 2013.

Disable Excel AutoSave in VBA for Office 2016 and 2013
Product
Microsoft Excel 2013 and Excel 2016
Device & OS
not provided
Scenario
A macro uses SaveAs on a workbook stored in SharePoint or OneDrive.
Observed behavior
AutoSave can trigger repeated saves and update the modified date, but the AutoSaveOn property may not be available in older Excel versions.
Before you start

Open the workbook in Excel and enable macros only if you trust the file. Check File > Account > About Excel for the version, and confirm that the intended workbook is active before running the code.

Solution 1Recommended

Disable AutoSave with version-aware VBA

Use late binding and error handling to avoid a missing-property failure in Office 2013 or an Excel 2016 installation without AutoSave support.

Office 2013 reports version 15.0. Excel 2016 and later report version 16.0, but that version number alone does not guarantee that AutoSave is available.

1
Open the VBA editor

In Excel, press Alt+F11, then choose Insert > Module.

2
Add the macro

Paste this code into the module: Sub DisableWorkbookAutoSave() Dim errorNumber As Long If Workbooks.Count = 0 Then Exit Sub If Val(Application.Version) < 16 Then Exit Sub On Error Resume Next Err.Clear CallByName ActiveWorkbook, "AutoSaveOn", VbLet, False errorNumber = Err.Number On Error GoTo 0 If errorNumber <> 0 Then MsgBox "AutoSave could not be turned off for the active workbook." End If End Sub

3
Run it before SaveAs

Return to Excel, activate the intended workbook, and run DisableWorkbookAutoSave from the Macros dialog before your SaveAs operation. Alternatively, call the procedure from your existing macro before SaveAs.

4
Check the result

If Excel displays an AutoSave toggle, check that it is off. If the macro reports an error, check whether AutoSave is supported for that Excel installation and workbook.

Disable AutoSave with version-aware VBA
Scope of the setting: This code attempts to change AutoSave for the active workbook, not for every workbook or all future Excel sessions. It does not disable AutoRecover.
Free Microsoft Office alternative

Work with Excel spreadsheets in WPS Office

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and support for common Excel formats, making it easy to move everyday spreadsheet work. It does not change Microsoft Excel's AutoSave behavior, and VBA macro compatibility should be checked separately.

Open and edit common Excel XLSX and XLS filesUse a familiar spreadsheet interface for everyday workbook tasksMove existing spreadsheet work to a lightweight Office alternativeUse free spreadsheet tools without changing Excel's AutoSave settings
microsoft office alternative - wps office

Frequently Asked Questions

Does Excel 2013 support the AutoSaveOn property?

Excel 2013 reports version 15.0 and may not expose AutoSaveOn. Skip the property for that version and use late binding with error handling for later versions.

Why does the macro check the version and still use error handling?

Excel 2016 and later report version 16.0, but not every installation or workbook supports AutoSave. Error handling catches cases where the property cannot be set.

Does turning off AutoSave also turn off AutoRecover?

No. AutoSave and AutoRecover are separate features. In Excel, you can review AutoRecover settings under File > Options > Save.

Which workbook does the VBA code affect?

The example targets ActiveWorkbook. Activate the intended workbook before running it, or change the code to reference a specific workbook in your macro.