This article outlines a solution to enable automatic updates when executing a macro in a new Excel document with "Automatic Updates Disabled."
Context
When you try to open two Excel workbooks and enable automatic updates in one, Excel may not be able to open the second workbook. In such cases, you can execute a macro in a new Excel document to enable automatic updates.
Solution
To enable automatic updates in a new Excel document using a macro, follow these steps:
- Open a new blank Excel document.
- Press Alt + F11 to open the Visual Basic for Applications (VBA) editor.
- Press Insert > Module to create a new module.
- Copy and paste the following code snippet into the module:
- Save the macro with a descriptive name, such as "EnableAutomaticUpdates."
- Close the VBA editor.
- In the new Excel document, press Alt + F8 to open the Macro dialog box.
- Select the "EnableAutomaticUpdates" macro and click "Run."
Sub EnableAutomaticUpdates() Application.AutomaticSaveEnabled = True Application.AutomaticUpdates.AutoUpdateMethod = xlUpdateAutomatic Application.AutomaticUpdates.UpdateMode = xlUpdateNotify Application.AutomaticUpdates.UpdateFrequency = xlUpdateFrequencyDaily Application.AutomaticUpdates.UpdateInterval = 1 End Sub
After running the macro, automatic updates will be enabled in the new Excel document.
References
For further information on Excel VBA and automating tasks, check out: