Expected user-defined type, not project

This page is specific to the Visual Basic for Applications (VBA) Language Reference for Office 2010.

There is no user-defined type by this name in the current scope, but there is a project by this name. You can define a variable as having user-defined type, but not project type. This error has the following cause and solution:

  • The name of a project is used as a user-defined type. Check the spelling of the name of the user-defined type, and make sure the user-defined type isn't private to another module.

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).