By Brandon Germaine on Monday, 04 February 2013
Category: WebSan Blog

Resolving The "File not found: VBA6.dll" Error

Learn more about Dynamics GPView Dynamics GP PricingFree Dynamics GP Training

There are a number of recorded issues with Microsoft Dynamics GP 10.0 and 2010 when attempting to reference VBA code on 64-bit machines. Both Office 2010 and Crystal Reporting are known culprits in causing this issue to occur, as their installations update some system registry keys for VBA 6 incorrectly. Office 2010 references VB7, thus it should not be affecting keys it does not require. Registry Keys are used by the system as container objects, similar to folders, that can store values or further keys. If the value of a registry key is changed without the knowledge of an application that references its value, problems can arise. This would be the case for the VBA 6 file not being found.

I recently had a client of whom we were aiding implement an on-premise installation of GP and needed to deploy the software, along with any customized forms and reports we had designed, to a dozen workstations. After completing the deployment steps without any issue on the first three workstations, it was not until the forth that the system administrator eventually encountered the “File not found: VBA6.dll” error. The error can occur either on login to GP or when accessing custom VBA code through ‘Modifier’, if installed. Upon discussion, I was told that both Office 2010 and Crystal Reporting resided on the machine (Crystal was later removed, however the effects its installation has on registry keys can remain even after its removal).

To resolve the issue, there are two steps that need to be confirmed and/or completed to allow GP to properly reference the system dll:

(NOTE: Making changes to system registry keys is only advisable for advanced users, as incorrectly performing any steps can corrupt the system if care is not taken. Contact your system administrator for help.)
1. Ensure that Dynamics GP is not running.

2. We need to ensure that ‘VBA 6 Core components’ is installed on the workstation. This can be found in the following path: C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6\VBE6.dll

If the file or path does not exist, then the VBA6 folder can be copied from another workstation that has it on their system. Otherwise, the VBA 6 Core Components will need to be downloaded and run on the machine to install the correct files. This can be accessed from: https://mbs2.microsoft.com/fileexchange/downloadfile.aspx?fileid=2208ac6f-d575-4f34-8b19-40340fe3d20c(the download will require either a CustomerSource or PartnerSource login). The file can be obtained through other means, but you need to ensure that the file is coming from a trusted site as dll files, along with any system files, can be dangerous to your system if they are not genuine.

3. Once the path and the dll file exist on the workstation, we will need to update a registry key to point to the new path:

a. Click on the Windows start button and in the search box, type: regedit and hit enter

b. This will open the Registry Editor window.

From here, you will need to navigate on the left side of the window to: HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.0\9\win32

and ensure the path for the key is set to: C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6\VBE6.dll

c. If the path specified above does not exist in the System Registry, then we will need to create a registry file to add the appropriate node.

i. Open ‘Notepad’ and copy the copy the following text into the blank document:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.0]

@="Visual Basic For Applications"

[HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.0\9]

[HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.0\9\win32]

@="C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6.DLL"

[HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.0\FLAGS]

@="0"

[HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.0\HELPDIR]

@="C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\"

ii. Save the Document as a .reg file. Now, double-click on the registry file you just created and click ‘OK’ to add it to the system registry.

4. Start GP and enter your credentials. Now proceed to perform whatever task was notifying you of the error.

With the dll file in place and the path correctly pointing to the file, the error message should disappear. Hopefully, Business Objects, and especially Microsoft, ensure that their products do not affect any registry files that do not pertain to the particular application themselves.

Brandon Germaine is an Application Specialist at WebSan Solutions Inc, a Microsoft Dynamics GP Silver Partner & 2012 Microsoft Impact Awards Finalist. Brandon can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it. or 416-499-1235 ext 219.