Excel.application.activeworkbook.saveas quit excel.exe

M9 1a8 8 0 1 0 0 16A8 8 0 0 0 9 1zm. M9 1a8 8 0 1 0 0 16A8 8 0 0 0 9 1zM8 15. I have a bunch of Excel workbooks that contain multiple worksheets. I want to loop through each workbook and export each worksheet into it’excel.application.activeworkbook.saveas quit excel.exe own new workbook.

I want one worksheet in each new workbook. Does this work for one worksheet? I get an error on the paste bits: System. Within Excel this would be accomplished by copying the worksheet to a new workbook, not by creating a new workbook then adding the worksheet to it. This is achieved by using Worksheet. Copy without specifying where in the workbook you want to place the copied worksheet. How do you access the newly created workbook with the new worksheet?

Gern, you raise a good point. You’d have to access the workbook by name which would be automatically generated. Yes, this works too if your goal is, ultimately, to save the workbook as well. Lunatik got it right though, you should give him the check mark for a correct answer. Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question.