bftbeckett
New Member
- Joined
- Apr 20, 2022
- Messages
- 6
- Office Version
- 365
- Platform
- Windows
Hi all,
I am using the "Sub SplitEachWorksheet()" function in the VBA Module to get the file to split out into separate files for each sheet. However, I need a Summary report of the files created. Is this possible?
Preferably a summary as follows:
Worksheet name | File Name Created
Current Code:
I am using the "Sub SplitEachWorksheet()" function in the VBA Module to get the file to split out into separate files for each sheet. However, I need a Summary report of the files created. Is this possible?
Preferably a summary as follows:
Worksheet name | File Name Created
Current Code:
VBA Code:
Sub SplitEachWorksheet()
Dim FPath, FileExtStr, DateString, xFile As String
Dim FileFormatNum As Long
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 & ".csv"
Application.ActiveWorkbook.Close False
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Last edited by a moderator: