This documentation is archived and is not being maintained.

Type '<typename>' is not defined 

The statement has made reference to a type that has not been defined. You can define a type in a declaration statement such as Enum, Structure, Class, or Interface.

Error ID: BC30002

To correct this error

  1. Check that the type definition and its reference both use the same spelling.

  2. Check that the type definition is accessible to the reference. For example, if the type is in another module and has been declared Private, move the type definition to the referencing module or declare it Public.

  3. Check that the namespace of the type is not redefined within your project. If it is, use the Global keyword to fully qualify the type name. For example, if a project defines a namespace named System, the System.Object type cannot be accessed unless it is fully qualified with the Global keyword: Global.System.Object.

  4. If the type is defined, but the object library or type library in which it is defined is not registered in Visual Basic, click Add Reference on the Project menu, and then select the appropriate object library or type library.

See Also

Show: