ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro for worksheet to workbook (https://www.excelbanter.com/excel-programming/286140-macro-worksheet-workbook.html)

Brian

Macro for worksheet to workbook
 
Can someone help me with a macro? I am looking for
something that will take each of my worksheets and copy
them to their each individual workbook? TIA



Ron de Bruin

Macro for worksheet to workbook
 
Try this Brian

Sub test()
Application.ScreenUpdating = False
For a = 1 To Worksheets.Count
Sheets(a).Copy
ActiveWorkbook.SaveAs Sheets(1).Name
ActiveWorkbook.Close False
Next a
Application.ScreenUpdating = True
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Brian" wrote in message ...
Can someone help me with a macro? I am looking for
something that will take each of my worksheets and copy
them to their each individual workbook? TIA





Brian

Macro for worksheet to workbook
 
Thanks Ron!


-----Original Message-----
Try this Brian

Sub test()
Application.ScreenUpdating = False
For a = 1 To Worksheets.Count
Sheets(a).Copy
ActiveWorkbook.SaveAs Sheets(1).Name
ActiveWorkbook.Close False
Next a
Application.ScreenUpdating = True
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Brian" wrote in

message ...
Can someone help me with a macro? I am looking for
something that will take each of my worksheets and copy
them to their each individual workbook? TIA




.



All times are GMT +1. The time now is 03:47 AM.

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