DELETE not valid on: <name>
You used the Delete statement on one of the following:
- A variable that is not an object reference variable
- A variable of type Variant that does not contain an object reference
- The return value of a function
- A property
Assign the object to an object reference variable and apply Delete to the variable instead.