+ Reply to Thread
Results 1 to 10 of 10

moving a sheet to new workbook

  1. #1
    Registered User
    Join Date
    08-02-2008
    Location
    India
    Posts
    88

    moving a sheet to new workbook

    Dears
    I have a workbook with some 60 (59+1) sheets. 59 will be different all the time but 1 worksheet will always be named as ""Master"".

    Now I want every worksheet to be saved as a new workbook along with the Master sheet. Ultimately after running the macro I want to see 2 sheets in the new workbook out of whih this MASTER sheet is common in all the workbooks

    The below code allows me to save every active worksheet as a new workbook in one particular folder.
    However I couldn't move/copy the MASTER.

    Your help is appreciated.Thanks"
    Please Login or Register  to view this content.
    Last edited by arthurbr; 07-22-2011 at 02:26 AM. Reason: Changed HTML to Code tags

  2. #2
    Registered User
    Join Date
    08-02-2008
    Location
    India
    Posts
    88

    Re: moving a sheet to new workbook

    With the help of the above code I could save the sheets as a new workbook, but my MASTER sheet is not getting saved along with the other worksheets.

  3. #3
    Registered User
    Join Date
    08-02-2008
    Location
    India
    Posts
    88

    Re: moving a sheet to new workbook

    any help on this pls?

    I have crossed more than half a bridge using Ron's code.......

  4. #4
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: moving a sheet to new workbook

    hi,

    what about my code ?

    Please Login or Register  to view this content.
    Best Regards
    MaczaQ
    Last edited by MaczaQ; 07-22-2011 at 12:16 PM. Reason: code update - allow to overwrite files

  5. #5
    Registered User
    Join Date
    08-02-2008
    Location
    India
    Posts
    88

    Re: moving a sheet to new workbook

    thank you for the code.

    Does this code saves master sheet alone as a new workbook? or

    by default it moves the master sheet to the every other workbook in a particular folder?

    i could not test this now as i dun have excel with me...

  6. #6
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: moving a sheet to new workbook

    my solution create copy for each sheet with name other then Master so if you have sheets: Master + 10 worksheets (diffrent names) you will get 10 xls files containt 2 sheets each (Master + 1 of other name sheet). Source workbook will be not changed.

    Best Regards
    MaczaQ

  7. #7
    Registered User
    Join Date
    08-02-2008
    Location
    India
    Posts
    88

    Re: moving a sheet to new workbook

    Hi

    getting below error mesage

    compile error:

    Wrong number of arguments or invalid property assignment

  8. #8
    Registered User
    Join Date
    08-02-2008
    Location
    India
    Posts
    88

    Re: moving a sheet to new workbook

    is it possible to add an argument to my existing code?

  9. #9
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: moving a sheet to new workbook

    make sure that your master sheets is called "Master" and that you are not using characters not allowed in system files name ({}_+,.?> etc.)

    In attached file you will find working example.

    Best Regards
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    08-02-2008
    Location
    India
    Posts
    88

    Re: moving a sheet to new workbook

    Dear maczaq

    Not sure what is wrong with my sheet... it is still showing the sam error.. however when i use ur sheet it is working

+ 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