Excel – Enable macros or ActiveX controls by default

If you get a "Security Warning – Macros have been disabled" message in Excel, like the following…

Excel - 'Security Warning macros have been disabled'
Excel – ‘Security Warning macros have been disabled’

… just click Enable Content and Excel will remember your choice, and the next time you open this file you won’t get the warning.

However, if you rename the file, or if perhaps you have VBA save copies of the file with modified file names, you’ll see the warning again for each new file-name. This could be problematic if you later need VBA to dynamically open these files for editing (the code would get stopped in its tracks!).

In this case you would just need to set Excel to trust all macros for all files, like so…

File > Options > Trust Center > Trust Center Settings > Macro Settings > click Enable all macros

Excel Trust Center - Enable macros by default
Excel Trust Center – Enable macros by default

You would only tick Trust access to the VBA project object model if you’re creating sophisticated VBA code specifically designed to modify the code within your project’s Subroutines and Functions.

Occasionally you’ll come across (or write code for) an Excel workbook where ActiveX objects are used — usually form controls. Similar to above, if you need a global solution, check Enable all controls without restrictions and without prompting.

Excel Trust Center - Enable ActiveX controls by default
Excel Trust Center – Enable ActiveX controls by default
Facebooktwittergoogle_plusredditlinkedintumblrFacebooktwittergoogle_plusredditlinkedintumblr