Consolidated Workbook
the following code allows you to select a Folder and then saves each
worksheet in the folder using the sheetname as the new workbook name.
Sub split_book()
Set objShell = CreateObject("Shell.Application")
On Error Resume Next
Set objFolder = objShell.BrowseForFolder(&H0&, "Select Folder ", &H1&)
If Not objFolder Is Nothing Then
Set oFolderItem = objFolder.Items.Item
Folder = oFolderItem.Path
For Each sht In ThisWorkbook.Sheets
sht.Copy
ActiveWorkbook.SaveAs Filename:=Folder & "\" & sht.Name
ActiveWorkbook.Close
Next sht
End If
End Sub
"Richard" wrote:
Good morning Excel people!
I have a workbook with 40 seperate worksheets. I would like to break this
up into 40 seperate workbooks. Is there a simple way to do this other than
having to move each ss one at a time.
Thanks for your help.
Rich
|