ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macro to move and save all sheets to seperate workbooks (https://www.excelbanter.com/excel-programming/372943-macro-move-save-all-sheets-seperate-workbooks.html)

Todd

macro to move and save all sheets to seperate workbooks
 
Hi is there a macro I can use to copy and save all worksheets in a book by
their sheet names to a specific location?

Thanks,


Todd

Gord Dibben

macro to move and save all sheets to seperate workbooks
 
Sub Make_New_Books()
Dim w As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In ActiveWorkbook.Worksheets
w.Copy
ActiveWorkbook.SaveAs Filename:="C:\Gordstuff\" & w.Name
ActiveWorkbook.Close
Next w
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP

On Thu, 14 Sep 2006 15:49:02 -0700, Todd wrote:

Hi is there a macro I can use to copy and save all worksheets in a book by
their sheet names to a specific location?

Thanks,


Todd




All times are GMT +1. The time now is 05:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com