Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this one
It will save each sheet in C:\ with the name of the sheet Sub test() Dim a As Integer Dim wb As Workbook Application.ScreenUpdating = False For a = 1 To ThisWorkbook.Worksheets.Count ThisWorkbook.Sheets(a).Copy Set wb = ActiveWorkbook wb.SaveAs "C:\" & wb.Sheets(1).Name & ".xls" wb.Close False Set wb = Nothing Next a Application.ScreenUpdating = True End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "lyric2002" wrote in message ... I am a novice when it comes to macros. I know how to record but am wondering if what I need needs to be written in VB. I have a worksheet consisting of multiple pages. I have been tasked to copy each page in the worksheet to a seperate workbook. Does anyone have any code that can do this? Is it possible? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro for Copying Worksheet to New Workbook | Excel Discussion (Misc queries) | |||
Macro add worksheet to workbook automatically | Excel Discussion (Misc queries) | |||
[Fwd: Run macro on exit worksheet/workbook] | Excel Discussion (Misc queries) | |||
Run macro on exit worksheet/workbook | Excel Worksheet Functions | |||
Macro for worksheet to workbook | Excel Programming |