Illegal use of ERASE

You used the Erase statement incorrectly. You can only erase an array, a list, a list element, or a Variant that holds an array, a list, or a list element.

Remove the invalid Erase statement or change the reference in the statement to an array, list, list element, or Variant.