Skip to content

Files

Latest commit

author
Docs Allowlist Management
Mar 22, 2024
76d3237 · Mar 22, 2024

History

History
49 lines (32 loc) · 1.73 KB

Excel.Workbook.AutoSaveOn.md

File metadata and controls

49 lines (32 loc) · 1.73 KB
title keywords f1_keywords api_name ms.date ms.localizationpriority
Workbook.AutoSaveOn property (Excel)
vbaxl10.chm199287
vbaxl10.chm199287
Excel.Workbook.AutoSaveOn
05/25/2019
medium

Workbook.AutoSaveOn property (Excel)

True if the edits in the workbook are automatically saved. Read/write Boolean.

Syntax

expression.AutoSaveOn

expression A variable that represents a Workbook object.

Remarks

When a new workbook is created, the default value for the AutoSaveOn property is False, the property is disabled, and the user's changes will need to be saved manually. However, if the workbook is hosted in the cloud (that is, OneDrive, OneDrive for Business, or SharePoint Online), the AutoSaveOn property defaults to True and the edits in the specified workbook are automatically saved. If a cloud-hosted workbook is shared with other users, their changes will also be automatically merged into the user's local copy when AutoSaveOn is True.

The following table shows examples of AutoSaveOn behavior.

AutoSaveOn toggle state Set AutoSaveOn to True Set AutoSaveOn to False
AutoSaveOn == True No-op AutoSaveOn turned off
AutoSaveOn == False AutoSaveOn turned on No-op
Disabled Error Error

For more information about AutoSave, see How AutoSave impacts add-ins and macros.

Example

This example notifies you whether the workbook is set to be automatically saved.

Sub UseAutoSaveOn()
    MsgBox "This workbook is being saved automatically: " & ActiveWorkbook.AutoSaveOn
End Sub

[!includeSupport and feedback]