+ Reply to Thread
Results 1 to 4 of 4

Need VB Code to Create new workbooks out of a list on one workbook

  1. #1
    Forum Contributor
    Join Date
    07-08-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    183

    Need VB Code to Create new workbooks out of a list on one workbook

    Basically I have a workbook called Control Form. In this Control Form there are 7 Sheets.

    The first sheet is the Main Control that will control certain information on all the forms that VB Code will create, such as date, creators name, etc.

    The Second Sheet is called REV LEVELS and will control drawing level revisions for all of the sheets that the VB code will create.

    All this information above has already been linked to the sheets which VB will be creating from the templates located in the Control Form Workbook. You should not have to worry about any of that.

    The next sheet is called FileCreator, where there will be a command button which is called "Create Files" which, when clicked on will create seperate workbooks, each with 4 sheets containing the templates located in the Control Form highlighted in blue (Form 1, Form 2, Form 3, and Notes). The Code will need to name each file according to the Part Number located on the FileCreator Sheet in the Control Form Workbook. Although nothing special needs to happen with the notes sheet before it is transferred, Form 1 will need to get the Part Number, Part Name, and Drawing Number plugged into the corresponding locations before it is copied to a new workbook. Since Form 2 and Form 3 have linked to Form 1 already I am hoping that when the 3 forms are transferred they will stay linked together.

    I tried to run a test on this just by highlighting the 4 sheets and copying them to a new workbook but it tells me it cannot copy them as a group because one of the sheets contains a list. (Form 1 contains a list to select the different Drawing Numbers) Let me know if this is going to be a problem, if so I can do without the list.

    Also the location where all the new workbooks will be saved is whatever the folder location is of the Control Form.

    Hopefully that all makes since..

    Please ask any questions for clarification. This seemed like quite an operation to me but I wanted to give it a try as we are currently manually copying a workbook containing the 4 blue sheets and renaming everything manually. I have a job coming up where I am going to need close to 250 different Part Numbers and if I could get this code working before it will save me a lot of time!

    Thanks a bunch for your help!!

    FYI The Control Form has been attached so you can play around with it and get a better idea of the flow..
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    07-08-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    183

    Re: Need VB Code to Create new workbooks out of a list on one workbook

    Oh I almost forgot!

    They're is some VB code that needs to appear under "ThisWorkbook" in the newly created workbooks. It looks like this:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-08-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    183

    Re: Need VB Code to Create new workbooks out of a list on one workbook

    Does anyone have any thoughts on this?

  4. #4
    Forum Contributor
    Join Date
    07-08-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2003
    Posts
    183

    Re: Need VB Code to Create new workbooks out of a list on one workbook

    I haven't figured this out yet if anyone has any ideas?

    Thanks..

+ 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