+ Reply to Thread
Results 1 to 5 of 5

Macro to Saving Workbook Sheets as Separate Macro-Enabled Workbooks

  1. #1
    Registered User
    Join Date
    11-06-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    5

    Macro to Saving Workbook Sheets as Separate Macro-Enabled Workbooks

    Hello!

    Since I am not overly familiar with VBA, I've been attempting to tweak previously successful macros.
    What I need is a macro that will save every sheet as a separate macro-enabled file.
    Also, I would ideally like the new file name to contain the original name of file "master" worksheet and the sheet name. For example, Master.xlsm would be parsed into Master_Sheet1.xlsm, Master_Sheet2.xlsm, Master_Sheet3.xlsm etc...
    Any assistance would be appreciated. Thanks!

    This code does save each sheet in a separate file... but doesn't save as a macro-enabled file, and only saves with the sheet name without a reference to the master sheet. (I grabbed this code from: http://www.excelforum.com/excel-gene...workbooks.html)
    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    12-31-2012
    Location
    Jhang, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Macro to Saving Workbook Sheets as Separate Macro-Enabled Workbooks

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-06-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Macro to Saving Workbook Sheets as Separate Macro-Enabled Workbooks

    Thanks for your help!
    I received an error from Microsoft Visual Basic (Run-time error '1004') when I went to ran this unfortunately: " This extension can not be used with the selected file type. Change the file extension in the File name text box or select a different file type by changing the Save as type."

    Any thoughts?

  4. #4
    Forum Contributor
    Join Date
    12-31-2012
    Location
    Jhang, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Macro to Saving Workbook Sheets as Separate Macro-Enabled Workbooks

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-06-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Macro to Saving Workbook Sheets as Separate Macro-Enabled Workbooks

    hafizimran,

    Your code worked beautifully!
    Thanks again for taking the time to help me out.

    ----

    I applied this macro with a few tweaks to have all files in a folder directory get parsed.
    If anyone else is looking for something similar:
    Please Login or Register  to view this content.
    Last edited by puppetpalace; 03-03-2013 at 02:23 PM. Reason: Just updating what I did with the code

+ 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