+ Reply to Thread
Results 1 to 2 of 2

Split .xlsm workbook into multiple xlxs. workbooks

Hybrid View

thelenw Split .xlsm workbook into... 11-29-2011, 04:08 PM
watersev Re: Split .xlsm workbook into... 11-29-2011, 04:28 PM
  1. #1
    Registered User
    Join Date
    08-03-2011
    Location
    San Francisco, US
    MS-Off Ver
    Excel 2007
    Posts
    1

    Split .xlsm workbook into multiple xlxs. workbooks

    I create a workbook every month with 8-10 tabs, and I need each tab to be its own workbook. I found code here (posted below) that works except it would be great if the new workbooks were xlxs instead of macro-enabled xlsm. Is there any way to add that to the code? Thank you

    Sub SplitSheets()
        Dim W As Worksheet
        
        On Error GoTo Err_SplitSheets
        
        Application.ScreenUpdating = False
        Application.DisplayAlerts = False
        For Each W In Worksheets
            W.SaveAs ActiveWorkbook.Path & "/" & W.Name
            W.Delete
        Next W
    
    Err_SplitSheets:
        Application.DisplayAlerts = True
        Application.ScreenUpdating = True
    End Sub

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Split .xlsm workbook into multiple xlxs. workbooks

    hi, thelenw, try to replace this line:
    W.SaveAs ActiveWorkbook.Path & "/" & W.Name
    with this:
    W.SaveAs ActiveWorkbook.Path & "/" & W.Name, 51

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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