+ Reply to Thread
Results 1 to 8 of 8

copy a project to a new workbook

  1. #1
    Registered User
    Join Date
    01-17-2011
    Location
    calgary, alberta
    MS-Off Ver
    Excel 2003
    Posts
    61

    copy a project to a new workbook

    What I need is when a user clicks a button, a new workbook is opened and is exactly the same as the source workbook so everything gets copied including userforms, etc.

    This is what I have so far:
    Please Login or Register  to view this content.
    unfortunately this line doesn't work of course
    Please Login or Register  to view this content.
    but what I have done is written in the comments what I would like to happen,but i'm not sure on how to do it exactly. can anyone help?

    thanks in advance!
    Last edited by calmena; 03-31-2011 at 12:58 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: copy a project to a new workbook

    Why not just create a template workbook?
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    01-17-2011
    Location
    calgary, alberta
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: copy a project to a new workbook

    Because I have other code to follow that I just didn't post in this forum that won't allow me to do that.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: copy a project to a new workbook

    I don't understand. A template workbook should contain all the code, userforms, formulas, formatting etc ready to input data to

  5. #5
    Registered User
    Join Date
    01-17-2011
    Location
    calgary, alberta
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: copy a project to a new workbook

    Let me explain. There are three parts to my workbook. part one and two are on the same worksheet. part one is header information the user enters once per week, part two is content the user enters once per day.

    this is how it works. day one, the user opens the blank workbook, enters all header info. and content for the day, save the file and closes it for the day. day two, the user opens day one's file, hit the macro button, and a new workbook is generated maintaining all of day one's part one header info, but clear out part two contents, then saves the file as a new name for day two. this process continues.

    part three is in each workbook contains an array of hidden formulas for use behind the scenes.

    maybe a template would work, but i've never used one and would have to learn the VBA code so that the button opens the template and to me it would perform the same task.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: copy a project to a new workbook

    Can you attach a workbook example.

  7. #7
    Registered User
    Join Date
    01-17-2011
    Location
    calgary, alberta
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: copy a project to a new workbook

    Sure. Thanks for you help!
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-17-2011
    Location
    calgary, alberta
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: copy a project to a new workbook

    In module1, there is code at the bottom that is commented out. this code used to be placed at the top in place of the code I'm working with now, to copy the workbook to a new workbook, however, it doesn't copy the userforms so I couldn't use it.

+ 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