Palisade Knowledge Base

HomeTroubleshooting@RISK for Excel: Simulation"GetPassword cannot be found."

4.41. "GetPassword cannot be found."

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

When I try to run a simulation with multiple CPUs, this message pops up:

The macro "...!GetPassword" cannot be found.

with my workbook name in the double quotes. What is GetPassword?

When your workbook has a password, the extra CPUs don't know the password and therefore they can't open the workbook to perform their assigned iterations. They look for a macro called GetPassword to tell them the password.

To solve the problem:

  1. Press Alt-F11 to open the Visual Basic editor.

  2. Press Ctrl-R to open the Project Browser. (If it's already open, the screen won't change when you press Ctrl-R.)

  3. Find your workbook name, such as "VBA Project (PhoneLog.xls)" and expand it by clicking the plus signs at the left till you get to Modules. If you have a Modules entry, click the plus sign if necessary to show the names of the individual modules, then jump to step 5.

  4. If you don't have a Modules entry, right-click on the VBAProject line item for your workbook and then select Insert » Module.

  5. Double-click on Module 1 (or any module name) and you should see a code window with (General) and (Declarations) or similar at the top. Click into the code window, scroll down to the bottom if necessary, insert a blank line and then paste this code:

        Function GetPassword() As String
            GetPassword = "I am the password for this workbook"
        End Function
  6. Change "I am the password for this workbook" to the actual password, keeping the double quotes.

  7. Click any other line in the same window, then in the menu click Debug » Compile Project to make sure that your code was inserted correctly.

  8. Close the VBA window and save your workbook. If it's an "Excel workbook (XLSX)" type, choose Save As and save it as type "Excel macro-enabled workbook (XLSM)".

In @RISK 5.5.1, make sure that the name of the workbook file (.XLS or .XLSM file) does not contain spaces or special characters such as parentheses. @RISK 5.5.1 will not be able to find the GetPassword macro if the name of the workbook contains these characters.

Additional keywords: GetPassword function

Last edited: 2018-03-09

This page was: Helpful | Not Helpful