Cause
This error occurs for a folder or table control if an attempt is made to access a sheet that does not exist.
For a table, the error is also returned if an attempt is made to delete all sheets of the table.
Action
Change your application code accordingly.