The VBA project

The Visual Basic Editor stores customizations in a project file. The first time you open the Visual Basic Editor, the runtime engine automatically creates a new, empty project file that is named based on the current dictionary. For example the VBA project created for Microsoft Dynamics GP is DYNAMICS.VBA.

If you’re working with a third-party application, VBA creates a separate project to store customizations named NAME.VBA, where NAME is the name of the third-party product’s application dictionary.

You can view a project using the Visual Basic Project Explorer:


Windows, reports and fields are not automatically part of the project. When you begin working with VBA, you’ll selectively add to your project the window, field and report objects you want to work with. Once added to your project, you can reference these objects in VBA. In addition, the Visual Basic Editor lets you add VBA user forms, user-defined procedures and user-defined class modules to your VBA project.

The VBA Editor lets you develop and maintain a single project at a time. To work with several different projects, store each project file in a separate location. When you need to work on a project, copy it to the same location of the runtime engine, then rename the file name.VBA, where name is the name of the dictionary the project is based on.

After you’ve completed a VBA project file, you’ll distribute it to users. This file contains your VBA code, the objects you’ve referenced in your VBA code, and any VBA user forms you choose to use.

Documentation Feedback