Excel 2007 sheet copy: Application-defined or object-defined error

excel-2007-application-or-object-defined-error.png

When you use the code sheet.copy normally a new workbook is created with a copy of that particular sheet. However in Excel 2007 (SP1) if the original workbook contains a macro when you run the code the first time you (might) get the following error: I could only reproduce this error when the original workbook […]