+ Reply to Thread
Results 1 to 4 of 4

VBA code that will save all sheets in workbook to seperate workbooks

  1. #1
    Forum Contributor
    Join Date
    03-30-2007
    Location
    London, UK
    MS-Off Ver
    Microsoft Office 2007
    Posts
    317

    Smile VBA code that will save all sheets in workbook to seperate workbooks

    Hi Guys,

    I have a weekly report that is automatically generated for cost over every department in our company.

    Each department have their own worksheet and there cost code is the Tab Name.

    What I wanted to know is this. Is it possible to use some VBA code that will copy each worksheet and save them to individual files? Is this possible?

    For example.

    If I had one worksheet with the tab name of sheet1 and another called sheet2.

    Then the code was save these two sheet into seperate workbooks with the filename sheet1 and another file called sheet2.

    Thanks in advance.
    Best Regards.

    Michael
    -----------------------------------
    Windows Vista, Microsoft Office 2007

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    You can try with this macro:
    Please Login or Register  to view this content.
    Please do attention at your sheet names because some characters can't be used to save file (es. \ " etc.)... you may use and istruction to delete them, for example:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    Forum Contributor
    Join Date
    03-30-2007
    Location
    London, UK
    MS-Off Ver
    Microsoft Office 2007
    Posts
    317

    Smile

    Thank you so much for your help Antonio.

    I take it I just apply this code as a module so that can be applied to the whole workbook?

    Thanks again.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    hacker47, have you ever thought of answering a question with help instead of a promotion of your software?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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