+ Reply to Thread
Results 1 to 4 of 4

Split multi-tab workbook into separate workbooks

Hybrid View

  1. #1
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Split multi-tab workbook into separate workbooks

    Aaron

    You could adapt this so you can select the workbook(s) to split out.

    As it is it splits out the workbook the code is in, ie ThisWorkbook.

    Sub SplitWBtoWS()
    Dim wbNew As Workbook
    Dim WS As Worksheet
    Dim strFilename As String
    
        For Each WS In ThisWorkbook.Worksheets
    
            strFilename = WS.Name
    
            WS.Copy
    
            Set wbNew = ActiveWorkbook
    
            wbNew.SaveAs ThisWorkbook.Path & Application.PathSeparator & strFilename
    
            wbNew.Close SaveChanges:=False
    
        Next WS
    
    End Sub
    If posting code please use code tags, see here.

  2. #2
    Registered User
    Join Date
    11-29-2012
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Split multi-tab workbook into separate workbooks

    Norie, this wasn't QUITE what I was looking for as far as ease of use, but quite honestly, after testing it out I think it's actually a better result than what I envisioned. It split all of my tabs into the separate worksheets and stored them in the folder the worksheet originated in - it's perfect and exactly what I need it !

    Thank you so much for the help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1