Palisade Knowledge Base

HomeTechniques and Tips@RISK: General QuestionsAvoiding "Do you want to change the current @RISK settings to match those stored?"

2.13. Avoiding "Do you want to change the current @RISK settings to match those stored?"

Applies to: @RISK for Excel 5.x–7.x

When I open certain Excel files, I get the message

The workbook workbookname has @RISK simulation settings stored in it. Do you want to change the current @RISK settings to match those stored in this workbook?

I try to clear all data via @RISK utilities before opening the workbook, but I still get this message. I need to get rid of this message as it makes all my VBA code stop. How can I suppress it?

The message is telling you that the workbook you're about to open has simulation settings inconsistent with the currently open workbook or with your defaults stored in Application Settings. It wants you to decide which set of settings should be in effect, since all open workbooks must have the same settings. You may be able to eliminate or at least reduce these warnings by adjusting your Application Settings, if you always make the same choices for all models. That is the simplest and safest approach.

You can suppress the warning and either accept or ignore the new workbook's settings by executing a line of Visual Basic code. Please see the @RISK for Excel Developer Kit manual for instructions on setting the required reference to @RISK to allow this code to execute.

(In addition to the specific code functions mentioned below, you will need to create one or more references in the Visual Basic Editor.  Please see Setting References in Visual Basic for the appropriate reference and how to set it.)

To suppress the message and load settings from the new workbook, use the Risk.SimulationSettings.LoadFromWorkbook method. For details and an example, please see "LoadFromWorkbook Method" in the @RISK for Excel Developer Kit manual referenced above.

To suppress the warning and ignore the settings in the new workbook, execute the following code in a macro before opening the workbook:

Risk.DisplayAlerts = False

After you open the workbook, we strongly recommend(*) executing this code:

Risk.DisplayAlerts = True

(*) Caution: Setting DisplayAlerts to False is potentially dangerous, because it suppresses all warnings from @RISK. Therefore, we strongly recommend that your macro set it back to True immediately after opening the workbook.

My problem is similar, but I'm getting that prompt when I open workbooks that didn't have any @RISK functions in them. I don't want to insert this macro in every workbook; what can I do?

Here is how that situation can arise: When you save a workbook while @RISK is running, if the current simulation settings are different from the current Application Settings, @RISK stores the current simulation settings in a hidden sheet in the workbook. This occurs whether or not the workbook contains any @RISK functions (because for all @RISK knows you might intend to add some @RISK functions to it later). If you later open your @RISK model and change some settings, the new stored settings in the @RISK workbook are different from the old stored settings in your non-@RISK workbook, so when you open the non-@RISK workbook you get the prompt.

To solve this, you need to remove the @RISK settings from the non-@RISK workbooks and ensure that they are not written again in the future:

  1. Run @RISK, and open the workbook that contains your @RISK functions plus the workbook(s) that do not.
  2. Change Application settings (in the @RISK Utilities menu) to match simulation settings.
  3. Save the workbook that contains @RISK functions.
  4. In the @RISK Utilities menu, select Clear @RISK Data, tick all four boxes, and click OK.
  5. (This step can be skipped with @RISK 5.7 and above.) In the @RISK Utilities menu, select Unload @RISK Add-in.
  6. Save the workbooks.

If later you want to change simulation settings in your @RISK workbook, do it by changing Application Settings. Remember, when you store a non-@RISK workbook, you want Application Settings and simulation settings to be the same, so that simulation settings don't get stored in the non-@RISK workbook. As an alternative, you can unload the @RISK add-in before storing the non-@RISK workbooks.

See also: @RISK Changes Simulation Settings When Non-@RISK Workbook Is Opened (only with @RISK 6.3)

Last edited: 2015-12-04

This page was: Helpful | Not Helpful