'Module' statements can occur only at file or namespace level

Module statements must appear at the top of your source file immediately after Option and Imports statements, global attributes, and namespace declarations, but before all other declarations.

Error ID: BC30617

To correct this error

  • Move the Module statement to the top of your namespace declaration or source file.

See Also

Module Statement