Skip to content

Instantly share code, notes, and snippets.

@imamuddinwp
Last active October 20, 2020 10:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imamuddinwp/6a45b57bacd87dfe993f7194eeaf53c0 to your computer and use it in GitHub Desktop.
Save imamuddinwp/6a45b57bacd87dfe993f7194eeaf53c0 to your computer and use it in GitHub Desktop.
Split a workbook to separate Excel Files ; powered by Imam Uddin, imamuddinwp; "split excel sheets into multiple files" "split excel sheet into multiple sheets based on rows" "split excel sheet into multiple files based on rows" "split excel sheet into multiple files based on column vba" "split excel into multiple files based on column" "how to …
Sub Sheets_To_Excel_Files()
'
'
'
'________powered by Imam Uddin
'________https://about.me/imamuddinwp/
'
'
Dim Numb As Integer
Dim FiPath As String
Dim MainFile As Workbook
'Variable declaration
Dim yn_Cond As Integer
' Yes No condition for your permission
yn_Cond = MsgBox("Are you ready to split all workbook into multiple files ?" & vbNewLine & "-------------------------" & vbNewLine & "Click on 'Yes' if you want to proceed!", vbYesNo + vbQuestion, "ProudLy Powered by ImAmUdDiN ")
If yn_Cond = vbYes Then
'----------------------------------------------
FiPath = ActiveWorkbook.Path
Set MainFile = ActiveWorkbook
For Numb = 1 To ActiveWorkbook.Sheets.Count
MainFile.Activate
ActiveWorkbook.Sheets(Numb).Copy
ActiveWorkbook.SaveAs (FiPath & Application.PathSeparator & ActiveSheet.Name)
'To close all newly created files only
ActiveWindow.Close
Next Numb
'----------------------------------------------
'Thnax, here is the finalization
MsgBox prompt:="Congrats! Check your created files on directory. " & vbNewLine & "-------------------------" & vbNewLine & "proudLy powered by" & vbNewLine & "Md.ImAmUdDiN" & vbNewLine & "https://about.me/imamuddinwp", _
Buttons:=vbInformation + vbMsgBoxHelpButton, _
Title:="Successful Message From ImAmUdDiN "
End If
End Sub
@imamuddinwp
Copy link
Author

imamuddinwp commented Oct 20, 2020

"Keyword"
"### excel vba save sheet as new workbook without opening"
"excel vba save multiple sheets as new workbook"
"how to export and save each worksheet as new workbook in excel"
"vba save each sheet as new workbook"
"excel vba save sheet as new workbook with date"
"excel vba save worksheet as new file values only"
"excel vba save workbook in specific folder"
"how to save multiple sheets in excel"

@imamuddinwp
Copy link
Author

imamuddinwp commented Oct 20, 2020

"Keyword"
"### split excel sheet into multiple sheets based on rows vba"
"split excel sheet into multiple files based on rows"
"split excel sheet into multiple files based on column vba"
"split excel into multiple files based on column"
"how to save a worksheet in excel to a separate file vba"
"split excel sheet into multiple workbooks based on column value"
"split excel file into multiple files by row python"
"split google sheet into multiple sheets"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment