+ Reply to Thread
Results 1 to 7 of 7

Save workbook as seperate workbooks

  1. #1
    Registered User
    Join Date
    09-05-2013
    Location
    Southend-on-sea, Essex, England, UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Cool Save workbook as seperate workbooks

    Hi all,

    I came across a post on here that has helped me in what I need to do but I need to change it slightly for my needs, link to previous post below:

    http://www.excelforum.com/excel-prog...workbooks.html

    I need this vba code to search for specific worksheets and then save them in a new workbook (I will specifiy the name of the workbook). This will happen multiple times for 18 worksheets in total. Some of the new workbooks will contain 2 of these worksheets, some will only contain one.

    I am assuming I could have a tab that lists which worksheets I want to go into a new workbook and then have a list next to that with the names I want to call each new workbook?

    Hope this makes - if you need any more information in your completing the quest to help me, please let me know

    Thanks in advance,
    Ruby.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Save workbook as seperate workbooks

    Yes, you can do this. Attach a sample workbook. Make sure there is just enough data to make it clear what is needed.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic


    Make sure your sheets are there and your LISTS sheet that lists what sheets will go into what new workbooks. This sheet should probably include a PATH to save these new workbooks into, as well.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-05-2013
    Location
    Southend-on-sea, Essex, England, UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Cool Re: Save workbook as seperate workbooks

    Hello,

    Thank you for your response I've attached a sample workbook as requested. I've listed the worksheets in column A & B and the name I want to call the newly created workbooks in column C.

    If you need anything else, please let me know.

    Thanks again,
    Ruby.
    Attached Files Attached Files

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Save workbook as seperate workbooks

    Experience tells me to rearrange your sheet so that you can have as many sheets as you want in the list without having to move the other columns, so I moved your workbook names to column A, now your sheet list can go as far to the right as you ever want it to go.

    Column A and column B should be considered REQUIRED for each row, then as many additional sheets as you want.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-05-2013
    Location
    Southend-on-sea, Essex, England, UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Save workbook as seperate workbooks

    Hello!

    Thank you again, this is very helpful. To get it to work I had to tell vba to ignore the below lines of code:

    If Right(fPATH, 1) <> "\" Then fPATH = fPATH & "\"
    ' If Len(Dir(fPATH)) = 0 Then
    ' MsgBox "The destination path does not exist or is incorrectly entered." & vbLf & "Please correct and try again."

    and

    ' Exit Sub
    ' End If

    It kept coming up with the incorrect destination path even though it is correct and I made sure it has a backslash after it :S

    But it works when I take that out so hurray thank you very much!!! I appreciate it

    Ruby

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Save workbook as seperate workbooks

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Registered User
    Join Date
    09-05-2013
    Location
    Southend-on-sea, Essex, England, UK
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Save workbook as seperate workbooks

    Done Thank you again!

+ 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. Creating Seperate workbooks from origional Workbook
    By mike02 in forum Excel General
    Replies: 1
    Last Post: 07-27-2012, 11:01 AM
  2. Creating a loop that will sort, copy, paste and save data into seperate workbooks
    By EggHead in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-14-2009, 03:17 PM
  3. Copy specific columns from mult workbooks to seperate workbook
    By excelgrrl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-02-2009, 10:12 AM
  4. VBA code that will save all sheets in workbook to seperate workbooks
    By Zyphon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-04-2007, 02:44 AM
  5. [SOLVED] Merging seperate workbooks into one workbook
    By Raoul Duke in forum Excel General
    Replies: 2
    Last Post: 06-22-2005, 02:05 PM

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