Statement is illegal in CLASS block: <keyword>
You used an illegal statement in a Class...End Class block.
The only legal statements in a Class...End Class block are:
- Declarations of variables without
the keyword Dim or Static
A variable may be declared Public or Private, or with no leading keyword
- Definitions and forward declarations of subprograms, without the keyword Static
- Definitions of the constructor and destructor subs (Sub New and Sub Delete) for the class
- The Rem statement
- The directives %Rem...%End Rem and %Include
By extension, when you use the %Include directive in a Class...End Class block, the file to which it refers must not contain any statements that are illegal inside a Class...End Class block.
Remove the illegal statement from the Class...End Class block.