Macro for creating new workbooks from 1 workbook with multiple sheet

bj6264

New Member
Hello

Can anyone help with a simple macro for creating new workbooks from 1 workbook that has about 50 sheets?

Thanks
 

bj6264

New Member
Thanks but this isn't quite what I want. I want to make all worksheets in 1 exisiting workbook into new workbooks - nothing to do with months.
 

dmt32

Well-known Member
Thanks but this isn't quite what I want. I want to make all worksheets in 1 exisiting workbook into new workbooks - nothing to do with months.
Link Armando provided was just to give a working example that you could adapt to meet your need. If that is not close then have a look at Ron's site to see if any help to you.

Dave.
Create a workbook from every worksheet in your workbook
 

bj6264

New Member
Thanks for your reply but I'm a real novice to VBA and your answers are way above my level. I think this may be a manual task for me.:eek:
 

Armando Montes

Well-known Member
Open de VBA editor, insert a Module and paste this code:
http://www.mrexcel.com/forum/<wbr>showthread.php?t=416894
Code:
Sub MoveSheetsToWorkbooks()
Dim Ws As Worksheet, strFilepath As  String

    strFilepath = ThisWorkbook.Path &  "\"
    
    Application.ScreenUpdating =  False
    For Each Ws In ThisWorkbook.Worksheets 'loop through  the worksheets
        Ws.Copy 'and copy  the sheet to a new workbook
         ActiveWorkbook.SaveAs strFilepath &  ActiveSheet.Name
         ActiveWorkbook.Close False
    Next
     Application.ScreenUpdating = True
    MsgBox "All Done",  vbExclamation + vbOKOnly
End Sub
 

Some videos you may like

This Week's Hot Topics

  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • find many based on a certain criteria
    good evening, I hope someone can help me? I have a workbook sheet 2 contains lots of data.... I would like to be able to find anything on sheet...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
  • Text Format
    I have a sheet for user to keyin the data. The format of the data can be 451 / 1903, 0012 / 9908 or 00287 / 0099. The number after the "/" is...
  • Macro to copy values across rows and transposing them and add the user id
    [FONT=Times New Roman][SIZE=3][COLOR=#000000][/COLOR][/SIZE][/FONT][FONT=Calibri][SIZE=3][COLOR=#000000]Hi,[/COLOR][/SIZE][/FONT] [FONT=Times New...
Top