Hi,
I need a help here ... if it's possible ....[Blocked Image: https://www.excelforum.com/images/smilies/frown.gif]
I have a file with 100 worksheets
worksheet1 - "Master"
worksheet2 - "Sheet2"
worksheet3 - "Instructions"
worksheet4 - "Headers"
worksheet5 - "tabel1"
worksheet6 - "tabel2"
worksheet7 - "tabel3"
.......
worksheet100 - "tabel96"
I use below code:
Code:
Sub SplitEachWorksheet()
Dim FPath As String
FPath = Application.ActiveWorkbook.Path
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each ws In ThisWorkbook.Sheets ws.Copy Application.ActiveWorkbook.SaveAs Filename:=FPath & "\" & ws.Name & ".xlsx" Application.ActiveWorkbook.Close False
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
it works, the code will create 96 files (named after the worksheet name) only with 1 worksheet.
I don't know how to change the code it but I need to create 96 separately file with 3 worksheets:
file1:
worksheet1 - "Instructions"
worksheet2 - "Headers"
worksheet3 - should be named "Items" - with the info from "tabel1"
file2:
worksheet1 - "Instructions"
worksheet2 - "Headers"
worksheet3 - should be named "Items" - with the info from "tabel2"
...........
file96
worksheet1 - "Instructions"
worksheet2 - "Headers"
worksheet3 - should be named "Items" - with the info from "tabel96"
Thank you!