Statement is illegal in a subprogram
You used one of the following statements within a LotusScript® procedure:
- Class
- Declare
- Function
- One of the Deftype statements
- Option Base, Option Compare, Option Declare, or Option Public
- Property Get
- Property Set
- Sub
- Type
- Use
- UseLSX
You can only use these statements at the module level.
Move the statement to the module level.