What is a VBA project name?
Occasionally you may find the need to check to see what your VBA project name is for your database. Typically it can, if named with an Access Reserved Word, cause problems with your code as it will return an error message of something like, “Expected procedure instead of project.”
Frequently Asked Questions
Where do I find the VBA project name in Microsoft Access?
The VBA project name is shown in the Project Explorer in the Visual Basic Editor. Open the VBA Editor from Access and look at the project listed in the Project Explorer window to see the current name.
How do I change the VBA project name?
In the Visual Basic Editor, select the project in the Project Explorer, open its properties, and edit the name field. The new name is then used by your VBA code.
Why does my VBA code return an error like “Expected procedure instead of project”?
As noted on this page, a project name that matches an Access reserved word can cause problems with your code and produce an error such as “Expected procedure instead of project.” Checking and renaming the project avoids the conflict.
Does the VBA project name have to be unique?
It is good practice to give each VBA project a distinct, descriptive name so references in your code remain clear and do not collide with reserved words or other projects.
Can changing the VBA project name break existing code?
If your code refers to the project by name, review those references after renaming so they continue to point to the correct project.