Seperating worksheets

S

Steve

I have a workbook with about 15 worksheets in it. Is there a quick way to
automatically seperate all 15 into single workbooks. or do I have to go 1 by
1?

Thanks,
Steve
 
R

Ron de Bruin

Hi Steve

Try this macro
It will save each sheet in a seperte wornook in C:\

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
 
S

Steve

The problem i am running into is that i can't find it. I am on a network here
at work. I swapped the c:/ with the path where i want the file to be saved.
We do not have a c drive. Shouldn't have worked? I can't find the seperated
documents anywhere.
 
R

Ron de Bruin

I have test in on my home network with

wb.SaveAs "\\Jelle\SharedDocs\" & wb.Sheets(1).Name & ".xls"

and it is working for me
 
Top