

This process might take a second to complete, and Excel could be unresponsive while this is happening.
#Cant turn on autosave excel 2016 code
Such an add-in might have BeforeSave code that serializes any maps that the user has created and stores them in the workbook in a CustomXML part. Imagine an add-in that allows the user to create custom maps based on data in an Excel workbook. When AutoSave is enabled, this code runs automatically on a periodic basis, which has the potential to interrupt the user, especially if the code takes a long time. When AutoSave is disabled, this code is only run when the user explicitly chooses to save, so a delay is not as noticeable and can be avoided by the user until he or she is ready to save. Therefore, if your code in a BeforeSave or AfterSave event handler takes too long to run, it may significantly degrade the user experience. In general, Word, Excel and PowerPoint are not responsive to user interaction while add-in or macro code is being run. Issue 1: Code in BeforeSave or AfterSave events runs too long


In general, these issues can be avoided if the user chooses to disable AutoSave. Because of this, add-ins and macros that leverage these events may experience problems when AutoSave is on. When AutoSave is enabled, these events fire automatically on a periodic basis without user interaction. Excel also provides an AfterSave event that can execute macro or add-in code after the save completes. If AutoSave is turned off, save must be triggered manually for the user's changes to be persisted in the cloud and for this user to receive others' changes.Ĭurrently, Excel, Word, and PowerPoint provide a BeforeSave event that allows a developer to execute code after the user triggers a save but before the save occurs. When the file is shared with others, their changes are merged into this user's version of the file. When a file is hosted in the cloud (that is, OneDrive, OneDrive for Business, or SharePoint Online), AutoSave enables the user's edits to be saved automatically and continuously.

Learn about how AutoSave works in Excel, PowerPoint, and Word, and how it can impact add-ins or macros.
