Illegal USE or UseLSX statement after declaration You used a Use or UseLSX statement after an implicit declaration. Move the Use or UseLSX statement so that it precedes all implicit declarations.