This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Download Microsoft Edge
More info about Internet Explorer and Microsoft Edge
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
Ensure that the type definition and its reference both use the same spelling.
Ensure 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
.
Ensure 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
.
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.
Ensure that the type is in an assembly that is part of the targeted .NET Framework profile. For more information, see
Troubleshooting .NET Framework Targeting Errors
.
See also
Namespaces in Visual Basic
Enum Statement
Structure Statement
Class Statement
Interface Statement
Managing references in a project