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.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
If you need to find out how many columns are set to be a specific width, you'll need a macro to help determine the info. ...
Discover MoreWhen developing a macro that others may use, you might want to test it out to make sure it works properly if a filter is ...
Discover MoreWhen you print a larger worksheet, Excel breaks the printout across several pages. You may want to know, before you ...
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