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
Check that the type definition and its reference both use the same spelling.
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.
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, thetype 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.