Error message when you try to open a customized screen in Microsoft Dynamics SL: "System Message 20406 - Error Loading VBA Project"

Article ID: 873686 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

When you try to open a screen that was customized by using Visual Basic for Applications in Microsoft Dynamics SL, you receive the following error message:
System Message 20406 - Error loading VBA project. HRESULT = %s.

CAUSE

Cause 1

The user or the group has insufficient Windows permissions for the Microsoft Dynamics SL installation directory. See Resolution 1 and Resolution 2.

Cause 2

In Windows Server 2003, permissions for the Everyone group on the Microsoft Dynamics SL shared installation directory may be too restrictive. See Resolution 3.

Cause 3

The Swimapi.Kpr file and the Swimapi.exd file are corrupted. See Resolution 4.

RESOLUTION

Resolution 1

Modify the Windows permissions for the Microsoft Dynamics SL installation directory. To do this, follow these steps:
  1. Locate the Microsoft Dynamics SL installation directory. The default location in Microsoft Dynamics SL 7.0 and in later versions is C:\Program Files\Microsoft Dynamics\SL. The default location in Microsoft Dynamics SL 6.5 and in earlier versions is C:\Program Files\Solomon.
  2. Right-click the folder, and then click Properties.
  3. On the Security tab, click to select the Allow check box for the permissions that are needed. See Knowledge Base article 849064 to determine the appropriate permissions.
  4. Click OK.
Note For more information about the recommended Windows permissions for Microsoft Dynamics SL users, click the following article number to view the article in the Microsoft Knowledge Base:
849064 Description of minimum rights for Microsoft Dynamics SL users
Note If the appropriate permissions have been assigned and the error persists, see Resolution 2.

Resolution 2

Enable the "Replace permission entries" option on the Solomon directory. To do this, follow these steps:
  1. At the Microsoft Dynamics SL server, right-click the directory that contains the Microsoft Dynamics SL program files, and then click Sharing and Security.
  2. On the Security tab, click Advanced.
  3. Click to select the Replace permission entries on all child objects check box.
  4. In the Advanced Security Settings window, click OK.
  5. Click OK to close the Properties dialog box.

Resolution 3

Make sure that the Everyone group is assigned Full Control permissions on the Microsoft Dynamics SL share.

Note By default, shares that are created in Windows Server 2003 assign only Read permissions for the Everyone group.

Resolution 4

Rename the Swimapi.kpr file and the SWIMAPIEx.exd file in the Solomon root directory. To do this, follow these steps:
  1. Log all users off Microsoft Dynamics SL.
  2. Browse to the Dynamics\SL folder or to the Solomon folder.
  3. Right-click the Swimapi.kpr file, and then click Rename.
  4. Replace the KPR file name extension with OLD, and then press Enter.
  5. Repeat steps 3 and 4 for the SWIMAPIEx.exd file.
  6. Log on to Microsoft Dynamics SL, and then open the customized screen(s).
Note
If you are running Microsoft Dynamics SL 6.5 SP2 on a Windows Vista computer, the Swimapi.kpr file and the SWIMAPIEx.exd file are in the following location:
C:\Users\<profile name>\Appdata\Local\Temp\APC\SWIMAPI
If you are running Microsoft Dynamics SL 6.5 SP2 on a Windows XP computer or on a Windows Server 2003 terminal server, the Swimapi.kpr file and the SWIMAPIEx.exd file are in the following location:
C:\Documents and Settings\<profile name>\Local Settings\Temp\APC\SWIMAPI

If you are running Microsoft Dynamics SL 6.5 SP3 or later versions on a Windows Vista computer, a Windows 2008 computer, or a Windows 7 computer the Swimapi.kpr file and the SWIMAPIEx.exd file are in the following location:
C:\Users\<profile name>\AppData\Roaming\Microsoft Dynamics SL\APC
If you are running Microsoft Dynamics 6.5 SP3 or later versions on a Windows XP computer or on a Windows Server 2003 terminal server, the Swimapi.kpr file and the SWIMAPIEx.exd file are in the following location:
C:\Documents and Settings\<profile name>\Application Data\Microsoft Dynamics SL\APC

Properties

Article ID: 873686 - Last Review: July 25, 2011 - Revision: 8.0
APPLIES TO
  • Microsoft Dynamics SL 2011
  • Microsoft Dynamics SL 7.0
  • Microsoft Dynamics SL 6.5, when used with:
    • Customization Manager
    • Tools for Visual Basic
Keywords: 
kbexpertisebeginner kbtshoot kbprb kbexpertiseinter kbmbsmigrate kbmbsvba KB873686

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com