Named product class instance not valid here

In one of the following statements, you used the name of a product object in a context in which it is not allowed:

  • An assignment statement (Let or =) in either of the following forms:

    Let name = ...

    name = ...

  • A Set statement in either of the following forms:

    Set name = NEW...

    Set name = ...

    Set name = Bind...

  • A Delete statement
  • An Erase statement
  • A ForAll statement
  • A Get or Put statement
  • An Input # or Line Input # Statement
  • An LSet or RSet statement
  • A Mid or MidB statement
  • A ReDim statement

Replace the name with an appropriate name, or remove the invalid statement.