File not found: VBA6.dll error occurs or GP crashes
This is a follow up to my previous post on the VBA6.dll not found error (for 64-bit). I have found this can occur on 32-bit computers and Microsoft Dynamics GP 10.0 and GP 2010.
[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:
- Log in to Microsoft Dynamics GP as 'sa', go to the Customization Maintenance window and export everything into a package file.
- 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.
- 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
- 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.
- Try having users login again to Dynamics GP to see if the same VBA6.dll or VBA7.dll error shows.
Important: This post contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base (KB) Article:
I have found that the issue is because the 4.0 registry key is missing. This is created with earlier versions of Microsoft Office and Microsoft Dynamics GP.
To resolve this error, you need to add the 4.0 registry key.
Here are the steps:
Make a full backup of the system registry.
Export all modifications to a .package file from Microsoft Dynamics GP under Tools | Customize | Customization Maintenance.
Create a .reg file that contained the following in Notepad:
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\\"
Next, double-clicked the .reg file, so it was added to the system registry.
The HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.1 key should point to the VBE7.dll file.
Next delete the .vba files that were 4kb and renamed the .vba files that were over 4kb in the Microsoft Dynamics GP code folder.
Start Microsoft Dynamics GP. You should not receive any errors.
Import the .package file. Verify the code works and the error no longer occurs.
I have had a few customers state that they had to unregister the msvbvm60.dll. But I did not run across that with the customers I have streamed in with.
Beth Gardner
Support Escalation Engineer
Microsoft Dynamics GP Developer Support
16-Nov-2010: Added link to previous 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.
Comments
Anonymous
November 15, 2010
For 64-bit computers, I've been using a script similar to this, but simply with "Program Files (x86)" instead of "Program Files"Anonymous
November 15, 2010
Hi Chaz Thanks for the feedback. You can also look at Beth's previous article (now linked) which covers the 64-bit situation: blogs.msdn.com/.../file-not-found-vba6-dll-error-occurs-or-gp-crashes-and-creats-a-watson-fault-bucket-1474386816.aspx DavidAnonymous
November 17, 2010
Posting from Mark Polino at DynamicAccounting.net msdynamicsgp.blogspot.com/.../file-not-found-vba6dll-error-occurs-or.htmlAnonymous
December 07, 2010
Posting by Steve Endow at Dynamics GP Land dynamicsgpland.blogspot.com/.../vba6dll-file-not-found-error-with.htmlAnonymous
February 08, 2011
Hi there, currently i also got same problem but the error messages only occured when i try to print on screen? (Base on my customer). Do i need to follow step above to solve my customer issue?Anonymous
February 09, 2011
Hi Shah You will probably find that you have VBA on your reports. I would suggest attempting the suggested fixes. DavidAnonymous
March 16, 2011
Posting from Steve Endow at Dynamics GP Land dynamicsgpland.blogspot.com/.../update-to-file-not-found-vba6dll-with.htmlAnonymous
August 17, 2011
The comment has been removedAnonymous
December 28, 2011
thanks it worked!!!!!Anonymous
January 17, 2013
Just creating the missing keys [HKEY_CLASSES_ROOTTypeLib{000204EF-0000-0000-C000-000000000046}4.0 worked nicely on NT 6.1 (server). Thanks Beth and the team - Rich.