'<keyword>' is valid only within a class

A keyword related to classes, such as Me or MyClass, is used outside of a class definition.

Error ID: BC32002

To correct this error

  • If the code using the keyword involves class instances, move it to a class implementation.

  • If the code using the keyword does not apply to classes, remove the invalid keyword.

See Also

Reference

Me

MyClass

Class Statement (Visual Basic)