![]() |
Worksheet saved out as new workbook
I have a workbook which contains about 15 worksheets. I update the data for
the workbook and now need to save the individual sheets as separate workbooks using the sheet names as the file name. How do I loop through each worksheet and save them as separate workbooks using the sheet 'tab' names as the file names? Sub SaveSheet() ActiveSheet.Copy ActiveWorkbook.SaveAs "C:\Data\AMReports\" & ActiveSheet.Name & ".xls" ActiveWorkbook.Close SaveChanges:=False End Sub Thanks - -TB- - |
Worksheet saved out as new workbook
See this page tom
http://www.rondebruin.nl/copy6.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "TOMB" wrote in message ... I have a workbook which contains about 15 worksheets. I update the data for the workbook and now need to save the individual sheets as separate workbooks using the sheet names as the file name. How do I loop through each worksheet and save them as separate workbooks using the sheet 'tab' names as the file names? Sub SaveSheet() ActiveSheet.Copy ActiveWorkbook.SaveAs "C:\Data\AMReports\" & ActiveSheet.Name & ".xls" ActiveWorkbook.Close SaveChanges:=False End Sub Thanks - -TB- - |
Worksheet saved out as new workbook
Thanks Ron (and Colby). I used adjusted the code just a bit and it worked as
advertised! Thanks again - -TB - - "Ron de Bruin" wrote: See this page tom http://www.rondebruin.nl/copy6.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "TOMB" wrote in message ... I have a workbook which contains about 15 worksheets. I update the data for the workbook and now need to save the individual sheets as separate workbooks using the sheet names as the file name. How do I loop through each worksheet and save them as separate workbooks using the sheet 'tab' names as the file names? Sub SaveSheet() ActiveSheet.Copy ActiveWorkbook.SaveAs "C:\Data\AMReports\" & ActiveSheet.Name & ".xls" ActiveWorkbook.Close SaveChanges:=False End Sub Thanks - -TB- - |
All times are GMT +1. The time now is 07:53 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com