Palisade Knowledge Base

HomeTroubleshootingAll Products: Startup"You have one or more open workbooks with associated VBA macros. ..."

2.99. "You have one or more open workbooks with associated VBA macros. ..."

Applies to: All Palisade add-ins releases 5.x–8.x, running in Excel 2007 or newer

I'm running Excel 2007–2016. I open @RISK and my workbook. @RISK puts up this message:

You have one or more open workbooks with associated VBA macros. Please ensure these macros are enabled before using Palisade DecisionTools add-ins. Failure to enable these macros can lead to unpredictable behavior.

Why is this message appearing, and how can I prevent it?

Why it happens:

In Excel 2007 or newer, a very unfortunate scenario is possible, one that could affect any macro-enabled code and not just the DecisionTools Suite add-ins. If a trusted add-in (macros enabled) is running, and your open workbook contains macros that have not been enabled, Excel and the add-in can become unstable, and all your work can be lost.

This is a bad situation, and there is no way any add-in can prevent it. Again, this can happen when your workbook contains disabled macros. @RISK, PrecisionTree, and our other add-ins all warn you when the potential exists for this situation, so that you can take the necessary action to protect yourself from losing your work.

There is unfortunately the possibility of "crying wolf" here. No add-in can enable macros in your workbook for you, and add-ins can't even detect whether macros have been enabled in user workbooks. (Microsoft Excel very properly makes such action impossible, because they could be exploited by viruses.) This means, unfortunately, that you see the message when you open a workbook that contains macros, even if you have already enabled macros for that workbook. Add-ins must give the warning message for every workbook with macros, or for no workbooks with macros. Because the potential downside is loss of days or weeks of your work, we chose the first course of action.

How to prevent the message:

Option 1: The simplest, safest, and most flexible solution is simply to keep your workbook in a trusted location that you have listed in Excel. Workbooks in trusted locations automatically have their macros enabled, and when a workbook is opened from a trusted location the message does not appear. To manage your trusted locations, please search Excel help, as follows:

  • Excel 2013 or 2016: "Add, remove, or change a trusted location"
  • Excel 2010: "Add, remove, or modify a trusted location for your files"
  • Excel 2007: "Create, remove or change a trusted location for your files"

When you receive a workbook from someone else, consider carefully before you place it in a trusted location.

Note: @RISK 6.2.1 and earlier check only the trusted User Locations, not the trusted Policy Locations. The procedures in Excel's help will suppress the warning message as promised, because they set User Locations. However, if your administrator sets Policy Locations, @RISK will not sense those as trusted, even though Excel does, and @RISK will display the warning message for macro-enabled files opened from those locations. Starting with release 6.3.0, @RISK senses both User Locations and Policy Locations. See also Group Policy and Office Customization Tool Settings: Technical Reference.

Option 2: Does your workbook actually need macros? Sometimes people create a new workbook as a copy of an existing one and then modify parts, or over time a workbook is modified or used differently and its macros are no longer needed. If you don't actually need the macros in your workbook, remove them and save the workbook as an .XLSX type. (You can access all macros by pressing Alt-F11 to bring up the VBA editor. After removing macros, you also need to delete any empty modules that contained macros.) Caution: It is not safe simply to disable macros for a workbook that contains them. That opens you up to the catastrophic scenario described above.

Option 3: For completeness, we mention one last possibility, though it is suitable only in very special situations. You could also prevent the message by choosing the lowest security setting, "Enable all macros", in the Trust Center's Macro Settings. But in general we recommend against that, because it leaves you vulnerable to any malicious code that might be embedded in a workbook.

Last edited: 2020-04-16

This page was: Helpful | Not Helpful