Statement is not valid inside a method/multiline lambda

The statement is not valid within a Sub, Function, property Get, or property Set procedure. Some statements can be placed at the module or class level. Others, such as Option Strict, must be at namespace level and precede all other declarations.

Error ID: BC30024

To correct this error

  • Remove the statement from the procedure.

See Also

Sub Statement
Function Statement
Get Statement
Set Statement