File not found: VBA6.dll error occurs or GP crashes and creates a Watson fault bucket 1474386816

Beth Gardner - Click for blog homepageWe have been running into a few different issues with Microsoft Dynamics GP 10.0 and GP 2010 when you have Office 2010 installed.

[Edit] Re-installing the VBA 6.4 core components (as used by Dynamics GP) has been shown to resolve this issue for VBA6.DLL, VBE.DLL, VBA7.DLL and VBE7.DLL errors. Please download the necessary files from this link:

[Edit 2] If installing the VBA Components does not resolve the issue try the steps below to unregister the msvbvm60.dll file:

  1. Log in to Microsoft Dynamics GP as 'sa', go to the Customization Maintenance window and export everything into a package file.
     
  2. Log out of Dynamics GP and then in the Dynamics GP code directory, move all of the .VBA files out into a backup directory as well as any forms and report dictionary files, such as Forms.dic and Reports.dic.
     
  3. Un-register the 'MSVBVM60.DLL file:
            • For a 64-bit Operating System: Go to Start > Run and enter in:
                          regsvr32.exe c:\windows\syswow64\msvbvm60.dll /u
            • For a 32-bit Operating System: Go to Start > Run and enter in:
                          regsvr32.exe c:\windows\system32\msvbvm60.dll /u
     
  4. Log back into Dynamics GP again as 'sa', go back into the Customization Maintenance window and import the package file from step 1 back into Dynamics GP, this will re-create the VBA files and forms and report dictionary files.
     
  5. Try having users login again to Dynamics GP to see if the same VBA6.dll or VBA7.dll error shows.

 

I have commented with this information on a newsgroup posting, but thought I could add more information here for all to see.

We have found that Office 2010 beta and other releases have updated some system registry keys for VBA 6 incorrectly.  The Office support team has currently created Knowledge Base (KB) article KB 978753 with the files they found causing issues in the Office VBA Editor.  However, we have found other areas in the system registry that have caused the VBA Editor in GP to have an incorrect reference to the Visual Basic for Applications reference that is used in the 6 version.

Note: Office 2010 uses the VBA 7 version in the VBA editor so it should not be updating the VBA 6 system registry keys and is doing so unintentionally.  I am working with the Office support team to add the system registry key we found also affected to their KB article and to the Fix It 50347 that is supplied within the KB article.

Here are the two scenarios I have taken cases on:

  1. Office 2010 64-bit is installed on a Windows 7 or Windows 2008 R2 computer.
  2. Microsoft Dynamics GP 2010 or 10.0 is installed.
  3. If you put a message box on a GP window, one of the following scenarios occurs:
     
    Note: See this post for 32-bit.

Scenario 1:

GP Crashes and creates Watson fault bucket 1474386816.

Scenario 2:

GP is stuck in a loop with the message box: File not found: VBA6.DLL


Screenshot from Vaidy Mohan's post, used with permission.

The really odd thing here is there shouldn't be a VBA6.dll file anywhere on the computer for these OS installs.  I had one partner add the VBA6.dll file all over the place and that caused GP to crash.  Once removed from all folders, The VBA6.dll file not found error occurred.

  1. If you go into VBA and then to Tools | References, highlight Visual Basic for Applications.
  2. Note the path given here.  I had two different paths for two customers:

Path 1:  C:\Windows\SysWOW\msvbvm60.dll
Path 2:  C:\Program Files (x86)\Microsoft Dynamics\GP2010\dexfield.tlb

Neither of these is correct.

I performed the following steps to resolve the error.

  1. Export all customizations to a .package file.
  2. Close Microsoft Dynamics GP.
  3. Make a backup of the system registry.
  4. Change the following key in the system registry: 
     
    HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.0\9\win32
     
    To have the path of this:
     
    C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6\VBE6.dll
     
    Note: If on a Windows 2008 Server R2 install the key was this:  HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.1\9\win32
     
  5. Delete all VBA files with a file size of 4KB.
  6. Rename all VBA files with a file size greater than 4KB.
  7. Start Microsoft Dynamics GP.
  8. Open VBA editor.
  9. Check the VBA reference to ensure the path is to the C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA6\VBE6.dll file.
  10. Add a window and field to VBA and test the message box code.
  11. Verify the message box works.
  12. Import all customizations.
  13. Verify more than one customization works.

This resolved the issue.

Some customers did report to me that they had to only change the path in the system registry key to point to the correct VBE6.dll file and that resolved it for them.  They did not have to go through all the other steps.  I also had one customer state that they had to unregister the msvbvm60.dll file and change the path in the registry to resolve the error. 

In my testing, unregistering this file only affected the HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\6.0\9\win32 system registry key.  I tried un-registering the msvbvm60.dll file and re-registering it.  When I re-registered the msvbmv60.dll file, it only updated the 6.0 system registry key previously mentioned.  It appears that we have seen some inconsistency in the system registry depending on if Office 2010 beta was installed or different upgrade paths for the Office product. 

As recommended, the system registry fixes must be performed at your own risk and you must back up the system registry before you perform these tasks.  I have had some customers feel that they would rather start fresh with the latest Office 2010 build and so they have decided to rebuilt the computer from scratch and remove all previous data on the computer.

This is completely a user preference and there are many options for this resolution.  I just wanted to post all the different methods I have used to resolve the cases I have seen and the decisions some customers have made for this resolution.

I will update this post when I hear back from the Office engineers assisting with these issues.

For more information, see these posts:

Beth Gardner

Support Escalation Engineer
Microsoft Dynamics GP Developer Support

16-Nov-2010: Added link to follow up article.

14-Mar-2011: Added link to VBA 6.4 core components (English only) which can be used to resolve this issue.

29-Oct-2012: Added some more terms for search: VBA.DLL, VBE.DLL, VBA6.DLL, VBE6.DLL, VBA7.DLL, VBE7.DLL.

05-Aug-2013: Updated fix information to clarify that Dynamics GP using VBA v6, even though the error might be for VBA v7.

09-Sep-2013: Added additional steps to unregister msvbvm60.dll if needed.