+ Reply to Thread
Results 1 to 10 of 10

exporting data from master file to template file (autopopulate a template)

  1. #1
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    exporting data from master file to template file (autopopulate a template)

    Hi all,

    I'm hoping someone can help me with some code to export from a database to a template which would be manageable to modify and expand on for an amateur level vba user.

    I've attached 2 test files, one is the database master file containing the projects (each row represents a project, unique reference number in column A) and the other is the blank template file i'm hoping to export data into and then save down with the naming convention "column A_column B.xlsx"

    Kept the test files simple but would need to modify any code to apply to much larger database consisting of many more fields etc.

    Thanks
    Neill
    Attached Files Attached Files
    Last edited by Gti182; 05-06-2014 at 11:27 AM.

  2. #2
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Re: exporting data from master file to template file (autopopulate a template)

    this should help, i suppose i'd need to bring in a loop too

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: exporting data from master file to template file (autopopulate a template)

    How do you need to populate your Template?

    On double click? with a userform search? I mean you have 4 rows of information in your Master and only space for one project in your template. Do you need to save every row from Master to Template

    or

    Save individual rows from Master to save in accordance to Column A_B (Copy one row from Master then create new workbook, then add the information in accordance, then save as?)

  4. #4
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Re: exporting data from master file to template file (autopopulate a template)

    Hi Excelnoub

    Yes each row/project would populate a template so for this example 4 templates would be populated.

    Ideally i'd like the templates to be populated all at once rather than individually as there can be anything up to 300+ projects within the master file to export
    Last edited by Gti182; 05-06-2014 at 08:02 AM.

  5. #5
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Re: exporting data from master file to template file (autopopulate a template)

    bump back up to page 1

  6. #6
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: exporting data from master file to template file (autopopulate a template)

    Give me a couple, I have a similar code that does the same thing.

    It creates a Folder and then a workbook, just trying to delete the folder part. For the transfer I also have a similar code that will create and paste the information, save then close.
    The issue, out of my scope, will be looping through rows and creating each rows vs a new workbook.

  7. #7
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Re: exporting data from master file to template file (autopopulate a template)

    That would be great, i may have some loop code i could try integrate

  8. #8
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: exporting data from master file to template file (autopopulate a template)

    First, add the following to a module in your Master workbook: this will need tweeking but you will get the idea

    This code was provided by shg

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Re: exporting data from master file to template file (autopopulate a template)

    wow Excelnoub, have no idea how i'd tweak that to fit my scenario

    I did manage to find a mixture of code and tweak it for this example and seems to work as required

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: exporting data from master file to template file (autopopulate a template)

    Nice... I was making a way longer code then expected with Matching / Find. I am at work so limited time frame to play around with it...


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro to extract a tab from one file, add it to a master template file and then save as
    By SweetSorcery in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-03-2014, 11:36 AM
  2. Replies: 2
    Last Post: 02-14-2014, 01:39 PM
  3. [SOLVED] Exporting data from master file to pre-populate many excel files from a template
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 08-07-2013, 07:52 AM
  4. Replies: 0
    Last Post: 06-24-2013, 11:27 AM
  5. Replies: 3
    Last Post: 05-15-2013, 11:34 PM

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