Copying/Saving Worksheets from a large workbook into separate files

FrustratedoverVB

New Member
Joined
Aug 6, 2010
Messages
11
I'm trying to copy and save worksheets from a large workbook into separate files. I also need to have the worksheets saved with the name of the tab as their file names and in the same path as the original workbook (which changes each month). The original workbook must remain intact. I've read several suggestions on other sites but most delete the original when saving the worksheets separately. Any direction that anyone can give would be greatly appreciated!!! I'm so lost on this one....
 
Hi,

Can u add some code to this, so the data is pasted as value in the new sheet? . I have formulas in the main sheet and the reference stops working when the tabs move as new sheets
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Don't know what you've tried but perhaps something like this.
Code:
Sub CreateNewWBS()
Dim wbThis As Workbook
Dim wbNew As Workbook
Dim ws As Worksheet
Dim strFilename As String

    Set wbThis = ThisWorkbook
    For Each ws In wbThis.Worksheets
        strFilename = wbThis.Path & "/" & ws.Name
        ws.Copy
        Set wbNew = ActiveWorkbook
        wbNew.SaveAs strFilename
        wbNew.Close
    Next ws
End Sub


Hi,

Can u add some code to this, so the data is pasted as value in the new sheet? . I have formulas in the main sheet and the reference stops working when the tabs move as new sheets
 
Upvote 0

Forum statistics

Threads
1,215,196
Messages
6,123,575
Members
449,108
Latest member
rache47

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top