Hi everyone.
I need some help in modifying the below VBA script:
******
******
The excel has 13 sheets.
Sheet 1 is used to enter some data, which then gets populated with some basic functions to the other 12 sheets which are the sheets that get split into the various excel files as per the VBA script.
I’d like the following to happen.
I need some help in modifying the below VBA script:
******
VBA 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
******
The excel has 13 sheets.
Sheet 1 is used to enter some data, which then gets populated with some basic functions to the other 12 sheets which are the sheets that get split into the various excel files as per the VBA script.
I’d like the following to happen.
- Sheet 1, the data entry sheet, does not need to be saved as a separate excel file.
- I would like all other 12 sheets to be saved NOT in the same folder where the master excel is located, but within a folder of its own. This new folder needs to be created in the same folder as where the master excel is located.
- Lastly, I would like the new folder to be named on as per the data, in this case a SKU number, which the user enters into cell B2 of the sheet 1, the data entry sheet.
Last edited by a moderator: