Written by Allen Wyatt (last updated March 19, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021
David is having occasional problems opening workbooks in Excel 2016 and Excel 2019. For instance, he may open a macro-enabled workbook and discover all macros within the file have disappeared. If he saves, closes, and re-opens the workbook in these versions the macros still do not reappear. However, if he opens the same workbook in Excel 2010 the macros are available with all working as intended. If he saves the file in Excel 2010, closes it, and then reopens it in Excel 2016 or Excel 2019, the macros will have reappeared. David wonders why this is happening.
Based on the description that David provides, this simply should not happen. A key to what is going on may be in how David opens the workbook in various versions of Excel. Let's say that you have three computers, all connected to a network drive. Each computer is running a different version of Excel (2010, 2016, and 2019). The Excel 2010 system seems to open the workbooks just fine, with the macros present. The other two do not.
This sounds like it could be a problem related to security settings on the Excel 2016 and Excel 2019 systems. It could very well be that the settings on the systems using the later versions are set to disable macros without notification, while the settings on the Excel 2010 system are set more permissively, to allow the macros. You can check and change the settings in this manner:
Figure 1. The Macro Settings in the Trust Center dialog box.
Figure 2. The Protected View options in the Trust Center dialog box.
Now you can try opening the workbook, and you should be able to access the macros just fine, though you will be asked if you want to enable them when you first open a macro-enabled workbook.
If the Excel versions are not on separate systems—if they are all installed on the same, single system—then it could be that they are somehow conflicting with each other. In that case, it would be helpful to find a different system on which just Excel 2016 is installed and see if the workbook, complete with working macros, will open on that system. If it does, then the solution that will give the most satisfactory results will be to uninstall Excel (all versions) from the problem system and reinstall just a single version of your choosing.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8107) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
The VBA programming language provided with Excel allows you to create and modify text files quite easily. Here's how to ...
Discover MoreWorkbooks get corrupted from time to time; that's a fact of life in an Excel world. If those corrupted workbooks contain ...
Discover MoreLogical structures are important in programming, as they allow you to control how the programming statements are ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2022-03-19 11:32:10
J. Woolley
Re. the Trust Center, you might also consider the following:
1. If your trusted files are in a limited number of folders (including subfolders):
1.a. Pick File > Options > Trust Center > Trust Center Settings… > Trusted Locations.
1.b. If the trusted folder is not already listed, click Add new location…, then add it.
1.c. When you Add (or Modify) a location, you can include a description and specify whether subfolders are also trusted.
2. If your file is in a Trusted Location, it does not need a Certificate. But if you want to add a Certificate to an Excel file, click Alt+F11 to open the Visual Basic Editor (VBE), then pick Tools > Digital Signature....
3. When your file has a Certificate, you can confirm that as a Trusted Publisher:
3.a. Open the file, pick File > Options > Trust Center > Trust Center Settings… > Trusted Publishers.
3.b. Select the applicable Certificate, then click OK.
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments