+ Reply to Thread
Results 1 to 6 of 6

Make new workbook from Master workbook

  1. #1
    Forum Contributor
    Join Date
    11-21-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    190

    Make new workbook from Master workbook

    Hi,
    I need to make a new workbook from Master workbook.
    I have some confidential data in Master workbook, so I am going to divide this Master workbook.
    In the Master, I got 18 sheets. In the NEW workbook, I will add 14 sheets from the Master.
    The tabs names will be the same. It will be identically same 14 sheets in NEW workbook.

    I need to be done this by VBA.
    I appreciate any help.

    Thanks

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Make new workbook from Master workbook

    Try this:-

    Change MyArray to list the sheets you want copied

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,523

    Re: Make new workbook from Master workbook

    Here's my attempt:

    Please Login or Register  to view this content.
    Just change any line I've commented with 'Change to suit' to your own requirements.

    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  4. #4
    Forum Contributor mongoose36's Avatar
    Join Date
    06-10-2013
    Location
    Lincoln
    MS-Off Ver
    Excel 2013
    Posts
    389

    Re: Make new workbook from Master workbook

    My approach is to open the master and save it as a new workbook and finally to delete the sheets you want deleted using the for loop at the bottom (this can easily be adjusted to skip certain sheets).

    Please Login or Register  to view this content.
    Last edited by mongoose36; 08-02-2014 at 10:00 PM.
    If your questions has been answered to your satisfaction please don't forget to do the following:

    Add Reputation ... and ... Mark Thread as Solved

    Thanks,

    Ma 10:8b Freely you have received; freely give.

  5. #5
    Forum Contributor
    Join Date
    11-21-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    190

    Re: Make new workbook from Master workbook

    Thanks,
    I keep getting Subscript out of range, Runtime error 9.

    Please Login or Register  to view this content.
    I have to copy and paste sheets that have the name starting"Site" like, Site-1, or Site NY, or Site_55 , just any sheet name starting "Site".
    I used "Site*" , but I got error 'Subscript our of range'
    I checked Master sheet 'mywb' and in this Master, I got 'Site-bb'. This supposed to be copied.

    How can I fix this problem?
    Thanks
    Last edited by Goodstart14; 08-03-2014 at 11:27 AM.

  6. #6
    Forum Contributor
    Join Date
    11-21-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    190

    Re: Make new workbook from Master workbook

    Thanks,
    I tried yours and it says, 'Subscript out of range' on ;


    copy to clipboard
    Sheets(MyArray(Counter)).Copy After:=Workbooks(MyName & " " & Day(Now) & "-" & Month(Now) & "-" & Year(Now) & ".xlsx").Sheets(1)
    How can I fix this?
    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 12
    Last Post: 07-29-2014, 01:06 PM
  2. Replies: 1
    Last Post: 07-19-2013, 04:34 PM
  3. Replies: 2
    Last Post: 09-11-2012, 09:42 AM
  4. Replies: 3
    Last Post: 04-11-2012, 09:07 PM
  5. insert data from child workbook to master workbook by search matching records
    By jjgal767 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-21-2011, 05:10 AM

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