BC30188: Declaration expected
A nondeclarative statement, such as an assignment or loop statement, occurs outside any procedure. Only declarations are allowed outside procedures.
Alternatively, a programming element is declared without a declaration keyword such as Dim
or Const
.
Error ID: BC30188
To correct this error
Move the nondeclarative statement to the body of a procedure.
Begin the declaration with an appropriate declaration keyword.
Ensure that a declaration keyword is not misspelled.
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
The .NET documentation is open source. Provide feedback here.
Feedback
Submit and view feedback for