View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default worksheet to workbook macro

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?