Home → Techniques and Tips → VBA Programming with @RISK → @RISK 4.5 VBA Macro Compatibility with 5.x
Applies to: @RISK for Excel 4.5, upgrading to @RISK 5.x Professional or Industrial Edition.
(@RISK Standard does not support automation.)
For compatibility of other releases, see Upgrading Palisade Software.
I wrote some macros to control my model in @RISK 4.5. Will they work in @RISK 5.x?
Macros that are called by @RISK (listed on the Macros tab of the Simulation Settings dialog) will probably be fine. But macros that call @RISK may need to be rewritten.
The macro language in @RISK 5.x is substantially different from the macro language in 4.5. The 4.5 interface was largely oriented toward stand-alone functions, but the 5.x interface is much more object oriented. This means, unfortunately, that some macros written for 4.5, such as macros that run fits and simulations, will no longer work in 5.x.
Because the overall architecture of the macro language has changed, the 5.x interface does not contain a one-to-one replacement for some of the functions from the 4.5 interface. For some macros written for 4.5, you will have to analyze the logic of the macro and rewrite it for the new object model. This cannot be done mechanically by any sort of automatic conversion program.
It was a difficult decision to make changes that would invalidate existing VBA macros, and we do understand and regret the inconvenience. But on balance we felt that the new object model offers so many advantages that the change was justified.
@RISK 5.0.1 improved compatibility
Some additional macros from @RISK 4.5 were implemented in 5.0.1 and later releases as "wrappers" for 4.5 macros, while others have stubs that give explanatory error messages. There's also a new manual in PDF, in addition to the help file. You will still need to rewrite some macros written for @RISK 4.5, but the new release makes the process easier.
@RISK 5.0.1 is included in the initial release of The DecisionTools Suite 5.0. If you have @RISK 5.0.0 and not the Suite, contact Palisade about updating to 5.0.1 or later. You won't need a new Activation ID, but you will need a new installer.
Documentation on the new macro language is available in different places depending on your version of @RISK:
@RISK 5.5.1, 5.7.0, and 5.7.1: run @RISK, then in the @RISK Help menu select Developer Kit, then Manual.
@RISK 5.5.0 and 5.0.1 (including DecisionTools Suite 5.0): click the Windows Start button, then Programs or All Programs, then Palisade DecisionTools, then Online Manuals, then @RISK for Excel Developer Kit.
@RISK 5.0.0: upgrade to at least 5.0.1 if you can, to get the macro compatibility features mentioned above. If you're unable to upgrade, click the Windows Start button, then Programs or All Programs, then Palisade DecisionTools, then Help, then @RISK for Excel Developer Kit Help.
We recommend you start with the Project Overview topic in the online manual or help file. That gives an overview of the new object model, with clickable links to various objects. Also check the Getting Started topic for the reference you must insert in your VBA module.
Additional keywords: XDK
Last edited: 2015-06-18