Autosave Function in Excel

How to Turn On AutoSave in Excel? (Step by Step)

Usually, Autosave is enabled in Excel by default. Let’s see how to Turn on Autosave options in Excel.

How to Recover the AutoSaved File?

Now, let’s see how to recover the fileRecover The FileRecovering unsaved Excel files means recovering the unsaved files after any accidental closure or crash and allowing to restore the last saved version displayed in the Document Recovery pane on the Excel next time.read more, which is got auto-saved. As you can observe, the file path that we had given in the “AutoRecover file location” copy the path.

We can also change the folder to save the backups by entering a different path into the “AutoRecover file location.”

Till now, we had learned how to turn on autosave in excel, time to be given to performing the task periodically, and many other features that we got.

Step 1 – Now, open the Microsoft Explorer; at the top of the bar, we should paste the path that we had copied from the “AutoRecover file location” and then press ENTER.

  • Step 2 – A window with files & folders that are auto recovered will be displayed. From this window, we can click on the file that we want to be recovered, and then you can keep the changes and save the workbook with a new name. Once you enter the path, the below window will pop out.

From here, we can recover the files which are not saved, and our work & time doesn’t go in vain by enabling the autosave in excel.

How to Turn on Autosave by Visual Basic Application (VBA)

Let’s see how can code using Excel MacroUsing Excel MacroA macro in excel is a series of instructions in the form of code that helps automate manual tasks, thereby saving time. Excel executes those instructions in a step-by-step manner on the given data. For example, it can be used to automate repetitive tasks such as summation, cell formatting, information copying, etc. thereby rapidly replacing repetitious operations with a few clicks. read more will help us to perform autosave in the excel workbook.

  • Step 1 – Open “Visual Basic Editor” from the Developer tab in your excelDeveloper Tab In Your ExcelEnabling the developer tab in excel can help the user perform various functions for VBA, Macros and Add-ins like importing and exporting XML, designing forms, etc. This tab is disabled by default on excel; thus, the user needs to enable it first from the options menu.read more as below.

  • Step 2- When we click on the “Visual Basic,” we can visualize a VBA editorVBA EditorThe Visual Basic for Applications Editor is a scripting interface. These scripts are primarily responsible for the creation and execution of macros in Microsoft software.read more getting pop out. This where we have to write code to perform the autosave operation.

  • Step 3 – Here, we are not going to create any module for our operation to perform as this is an “Event” where we are going to write a macro. An event is anything like if we open a workbook, then it will be considered as an event; similarly, if we made changes in the workbook, then it is also an event, closing the workbook is also an event, and so on.Step 4 – For the autosave operation, we assume “closing the workbook” as an event. Open “ThisWorkbook,” which is on our left side of the page, and start writing a macro.

  • Step 5 – As we open the “Thisworkbook,” we can see the “General” and change it to “Workbook” as follows.

  • Step 6 – When we change to a workbook, It gives an option to write a macro in an event “Workbook_Open().” There is a list of declarations that we can use to create an event on our right side. Here we will perform a task for autosave in excel, so we have to change the event to “Beforclose.”

  • Step 7 – Select “BeforeClose” and start writing the code for autosave in excel.

  • Step 8 – “ThisWorkbook.Save” will automatically save the workbook and save it as a macro-enabled workbook to run the code as below:

  • Step 9 – Save this workbook as a macro-enabled and close the workbook. Then we can observe that display alert asking for save or don’t save won’t get pop out, but some other warning alert will pop out which is as below:

Step 10 – Once you click on Ok, the workbook with changes will get autosaved. We can also disable this alert by using some code in VBACode In VBAVBA code refers to a set of instructions written by the user in the Visual Basic Applications programming language on a Visual Basic Editor (VBE) to perform a specific task.read more, which saves a workbook automatically in a simple way.

Let’s see how it works:

These warning messages will come through an application, so we take “Application.DisplayAlerts = False.” This means any display alert will not pop out once this line is included in the code. But it also important to include a line of “Application.DisplayAlerts = True” as this helps when something important displays alert to pop out.

Now try to make changes and close the workbook, we can observe that none of the display alerts will pop out, but changes will get saved. This operation will help us to save our work though we unexpectedly close the workbook without saving it.

Things to Remember

  • Autosave in Excel is a splendid feature that saves time and data by saving it on a periodic basis.As once we enable the autosave in Excel, we can’t close without saving, which may mislead though we don’t want to save the data.It always monitors the user’s work and updates the changes in content to share point or one drive.It also allows multiple people to edit the document simultaneously.

This has been a guide to what is Autosave in Excel File. Here we discuss how to turn on Autosave in Excel using Excel Options and VBA (Visual Basic Application) and examples. You may also look at these useful functions in excel –

  • Excel AutoRecoverFile Extensions in ExcelSave as in excelOneDrive Excel