For some reason this code works at home two test files, but when running at work I get this error. The macro loops through a list of sheet names in the macrobook and in the wb2 it should select all cells and copy paste as values, which doesn't happen because of this error. Then it deletes all sheets if the sheet name is not in the list in the macrobook. It does delete the sheets properly. Maybe the solution would be to add another code that loops through the remaining sheets and copy paste as values? Or does someone know what I'm doing wrong here.
Bookmarks