+ Reply to Thread
Results 1 to 8 of 8

Need help linking 2 macros: create workbook and split into many worksheets

  1. #1
    Registered User
    Join Date
    07-23-2012
    Location
    Milwaukee, WI
    MS-Off Ver
    Excel 2007
    Posts
    21

    Need help linking 2 macros: create workbook and split into many worksheets

    Hi!
    Thanks so much for having this forum. I've been able to modify existing codes that I've found to create these macros. I need some help linking them together:
    This one creates a new workbook from each sheet other than the master sheet:
    Please Login or Register  to view this content.
    This one takes the new sheet in the new workbook and breaks it out into 3 new sheets by filtering column 1 and then pasting and re-naming the new sheet:
    Please Login or Register  to view this content.
    I can't figure out how to link them so that when a new workbook is created it automatically breaks the new sheet into 3 more sheets.
    When I try, it pulls the information from the original Master sheet on the old workbook.
    This is my attempt:
    Please Login or Register  to view this content.
    I'll also attach the workbook I'm looking at.
    Thanks for your time,
    E
    Last edited by esmithqg; 10-06-2012 at 11:17 AM.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Need help linking 2 macros: create workbook and split into many worksheets

    Edit: I miss read your post let me work on it and i'll post back
    Last edited by mike7952; 10-06-2012 at 09:50 AM.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    07-23-2012
    Location
    Milwaukee, WI
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Need help linking 2 macros: create workbook and split into many worksheets

    Thanks for your time Mike!

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Need help linking 2 macros: create workbook and split into many worksheets

    Also can you upload your wb again it appears that it didnt upload

  5. #5
    Registered User
    Join Date
    07-23-2012
    Location
    Milwaukee, WI
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Need help linking 2 macros: create workbook and split into many worksheets

    I just realized that I need to run my first macro to make the sheet look how it should at the start...
    One second...
    So, I run a macro to get it from the 153.8 KB workbook to the 470.7 KB workbook, at which point I need to add the next macros. (The ones I need help linking)
    Thanks,
    Emily
    Attached Files Attached Files
    Last edited by esmithqg; 10-06-2012 at 10:04 AM.

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Need help linking 2 macros: create workbook and split into many worksheets

    Give this a try Run BreakOutbyCarton_v2

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-23-2012
    Location
    Milwaukee, WI
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Need help linking 2 macros: create workbook and split into many worksheets

    Thanks for your help Mike,
    I'm still having issues...
    I ran Sub BreakOutbyCarton_v2, which called CreateNewWorkbook, but instead of creating new sheets in the new workbook based off the contents of column A, it created new sheets in the Master workbook (based off the master sheet) and called them 1, 2, and 3. Then it took those sheets and created new workbooks called New Folder1, New Folder2, and NewFolder3.

    I'm looking to have it create the new workbook, and then take the first sheet from that new workbook and create sheets 1, 2, and 3 based off column A in the first sheet in the new workbook.

    In my attempt at linking the macros, it successfully creates the new workbooks that I need and then creates sheets 1, 2, and 3, but the information it is using to create sheets 1, 2 and 3 is coming from the master sheet in the original workbook, not the first sheet of the new workbook.
    Again, thanks for your time and help.
    Have a great day!

  8. #8
    Registered User
    Join Date
    07-23-2012
    Location
    Milwaukee, WI
    MS-Off Ver
    Excel 2007
    Posts
    21

    [Solved] Need help linking 2 macros: create workbook and split into many worksheets

    This is what I came up with...
    Please Login or Register  to view this content.

+ 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