I was recently deploying a number of GP customizations in the model of Forms and Reports with VBA, when I encountered the following error during package importing:
I had never seen this error before but upon review of the customized form, I realized that my VBA code failed to import along with the form itself. All users had logged out of the current environment and the customizations had been tested successfully in a test system. I was stumped. One common IT phrase came to mind when deciding on the next troubleshooting step: “Have you tried turning it off and on again?”
Although I did not restart the terminal server, I took to a similar strategy: I wiped all customizations and started clean. This step has worked in the past when users were navigating through customized GP windows, where the application would suddenly crash without warning. The following entry was logged in EventViewer on the server:
Any time you experience strange application crashes, or error messages when importing custom VBA packages, chances are there are corrupt dictionaries and VBA files sitting in your Dynamics GP program folders. The following are a number of steps to resolve most of these issues in a short period of time:
1) Export all custom packages from the instance of GP that you are experiencing said errors. If you imported a package and received an error, ensure that you do not include the half-imported customization within your exportation (you will be importing the necessary package separately).
2) Backup all DIC and VBA files (only VBA files greater than 4kb in size, meaning they are being used) located in the C:\Program Files(x86)\Microsoft Dynamics\GP2013, and GP2013\Data folders, respectively (this example uses the 2013 version of GP, however the GP2010 version would have a similar file path, and also assumes you are using a 64-bit system, otherwise the path would commence with ‘Program Files’).
3) Delete all the backed-up DIC and VBA files from the program folders.
4) Log into GP with a POWERUSER login and open the ‘Customization Maintenance’ window. You should see a blank list. First, import the package with which you were previously experiencing an issue, and then continue with the exported package from your working environment. Verify that all required custom forms and reports are set in the “Alternate Modified Forms/Reports” menu, and that the annoying '()' brackets are removed from the end of any VBA global modules.
5) Test all the customized items to ensure that the system is functioning as needed.
With everything backed up, there is no risk when running through these steps if you are puzzled by strange VBA issues.
Sometimes, you just need a fresh start.
Brandon Germaine is an Application Specialist at WebSan Solutions Inc, a Microsoft Dynamics GP Silver Partner 2013 Canadian Channel Elite Awards Winner. Brandon can be reached at