+ Reply to Thread
Results 1 to 3 of 3

Spit a workbook into multiple workbooks, while retaining the macros

  1. #1
    Registered User
    Join Date
    09-07-2012
    Location
    VA
    MS-Off Ver
    Excel 2007
    Posts
    20

    Question Spit a workbook into multiple workbooks, while retaining the macros

    I have used the code below to split a workbook by the values in column A. This has worked to retain some of the formatting, formulas and list names. However, it does not retain the macro I have behind the sheet I am splitting (sheet1). Does anyone know whether it is possible (with this code, modified somewhat, or another VBA script) to split a workbook by a column into multiple workbooks (.xlsm in this case) and retain the macros behind sheet1 in all the resulting workbooks? I have found a way to save as .xlsm by specifying: "FileFormat:= 52" in place of "XlNormal," but this does not keep the macros.

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    09-07-2012
    Location
    VA
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Spit a workbook into multiple workbooks, while retaining the macros

    If there is a way to add a particular macro to multiple existing workbooks in a folder, please tell me. I am NOT merely trying to run a macro on multiple workbooks from my end--I know how to do that. Each individual workbook needs to have the macro in it so that when I email the workbooks to other users it will work in each one.

    EDIT: I am told by a neighbor that this may be a job for VB 6. I'm not sure if this is the proper forum for solutions involving VB 6, but if anyone here is well versed in it they can send their proposed solution (in proper detail, please!) in a PM.
    Last edited by Eric09; 09-20-2012 at 08:29 AM.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Spit a workbook into multiple workbooks, while retaining the macros

    This is a forum where solutions are provided through formulae or even code (VBA).

    Its against the forum rules to send you solutions via PM. All users responding to your questions, will do so here itself for the benefit of the other users.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/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