Developing for Dynamics GP

by David Musgrave (Perth, WA, Australia) and the Microsoft Dynamics GP Developer Support Team (Fargo, ND, USA)

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

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

  • Comments 17

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.

  • Posting from Mark Polino at DynamicAccounting.net

    msdynamicsgp.blogspot.com/.../file-not-found-vba6dll-error-occurs-or.html

  • We have been facing this problem at a client of ours just recently. They upgraded all their workstations to Office 2010 over the weekend. We are finding that this can occur on workstations that are not 64-bit. The method of editing the registry, deleting VBA files and exporting customizations and re-importing customizations worked until the client rebooted and now we have the same problem again.

    Any ideas?

  • Hi Mike

    I have a case with that exact issue at the moment.  The version of office is 32 bit and the "fix" is not "sticking".  I will work with Beth to see what can be done.

    David

  • I've had the problem with this fix not sticking on 64bit Windows 7 with 32bit Office 2010 installed.

    I've been installing Excel 2007 along with 2010 to fix this problem (we still needed Excel 2007 to use the eOne SmartConnect add-in anyway).  Eventually I'd like to get rid of 2007.  BTW, we're on GP10 sp3.

  • Chris

    Do you look at Beth's following up post for 32-bit.

    blogs.msdn.com/.../file-vba6-dll-not-found.aspx

    David

  • Posting by Steve Endow at Dynamics GP Land

    dynamicsgpland.blogspot.com/.../vba6dll-file-not-found-error-with.html

  • "File Not Found"  i also faced the same dll error.Searching for a long time to get a solution but not yet. After seeing your post my error resolved. Thanks to this msdn blogs team. Expecting a lot from you so keep on posting this kind of blogs.

    godwinsblog.cdtech.in/.../requested-page-cannot-be-accessed.html

  • I have the same problem than Mike... when I reboot the server I have the same problem again, in my case I have Windows 2008 R2 64 bits, Office 2010 and GP2010, but I need a permanent solution... any idea???

  • Hi Julia

    Did you look at the second follow up article?

    blogs.msdn.com/.../file-vba6-dll-not-found.aspx

    David

  • Posting from Steve Endow at Dynamics GP Land

    dynamicsgpland.blogspot.com/.../update-to-file-not-found-vba6dll-with.html

  • Posting from Michael Johnson at MBS Guru

    mbsguru.blogspot.com/.../file-not-found-vba6dll-in-microsoft.html

  • Estos son algunos pasos que podemos seguir con referente a este error cuando tenemos

    -Office 2010 64-bit instalado y Windows 2008 R2

    1.-Buscar la siguiente ruta en el registro

    HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\6.0\9\win32

    Esta ruta tiene el siguiente valor

    C:\Windows\SysWOW64\msvbvm60.dll  

    2.- Modificar el valor por el siguiente

    C:\Program Files (x86)\Common Files\Microsoft Shared\VBA\VBA6\VBE6.DLL

    3.- Buscar la siguiente ruta en el registro

    HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.1\9\win32

    Esta ruta tiene el siguiente valor

                   C:\Progra~2\Common~1\Micros~1\VBA\VBA7\VBE7.DLL

    4.- Modificar el valor por el siguiente

    C:\Progra~2\Common~1\Micros~1\VBA\VBA6\VBE6.DLL

  • I ended up having to modify the registry at HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\6\9\win32.  Maybe because it wasSQL2008 R2 SP1?   The re-install of the download mentioned in the beginning did not work.

    Thanks for posting this!!

  • Denni,

    Good to hear that you are working.  For the registry key, it looks like Hugo above you talks about modifying both keys (if you had them).  It could be the SP version that changes which key to use.

    I'll have to take a look at that file link - it didn't work for me either and might have expired.

  • Denni,

    I take that back - I had no problem download the file.  The File Transfer window just had opened behind other windows and I didn't see it.

Page 1 of 2 (17 items) 12
Comments Information

PLEASE READ BEFORE POSTING

Please only post comments relating to the topic of this page.

If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.

Leave a Comment
  • Please add 4 and 1 and type the answer here:
  • Post