Split excel worksheets to individual files

If we have about many sheets in excel, and save all the sheets as their own files will definitely was not about to do this by hand. it take a take time!. I found a good tips from the internet, to solve this problem,in which using the macro!.

Here the 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

References/Sources:

http://superuser.com/questions/561923/how-can-one-split-an-excel-xlsx-file-that-contains-multiple-sheets-into-sep

Excel – save worksheets as separate files

References/Sources:

Be the first to comment

Leave a Reply

Your email address will not be published.


*