Open File, Copy Sheets Into It, Save As & Close

  • I have certain sheets that I want to copy into a workbook I have saved on the C:drive (C:\Book1.xls). I want to do this numerous times so I want to leave Book1.xls as a template for lack of a better word.


    I want to know how to code the following:
    open book1.xls copy certain worksheets into the book1.xls,
    saving book1.xls as another name (based on a variable in the active workbook) to C:\PATS,
    closing book1.xls, the original workbook that I copied the sheets from, and how to keep open the new book as well as how to close that too.


    thanks in advance


    so far i got this:

    [hr]*[/hr] Auto Merged Post;[dl]*[/dl]The reason why I want to do this is because Book1.xls has a password protected VBA project lock, and I figure if I copy sheets into this workbook as compared to a new one, my code on the worksheets I'm copying over into Book1.xls will be protected and not viewable. If that is not the case, please advise.
    Thanks

  • Re: Copy Sheets In An Active Workbook Into A Saved Workbook


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!