Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7075501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:11:06+00:00 2026-05-28T06:11:06+00:00

Here is what I am trying to do. I am trying to create a

  • 0

Here is what I am trying to do. I am trying to create a workbook based on a template named by the title and to create a workbook for each row. And for the macro to loop until all rows have been depleted.

The deliverables that I want at the end are 3 excel documents named (Alpha.xlsx, Beta.xlsx, Gamma.xlsx) with the corresponding values from access plugged into their corresponding cells in their corresponding workbook. The subsequent math is there because I need to be able to manipulate the values once they are in excel.

Here is some of the research that I’ve found that I haven’t quite been able to make much sense of due to my lack of experience coding in vba.

Links

(I can’t post more than 2 so I’ll keep the number of articles terse):

Research: databasejournal.com/features/msaccess/article.php/3563671/Export-Data-To-Excel.htm

Example Database/Spreadsheet:
http://www.sendspace.com/file/iy62c0

Image Album (has a picture of the database and the template in case you don’t want to download):
https://i.stack.imgur.com/75fvd.jpg

Any help will be much appreciated! I’ve been reading up and trying to figure out how to get this to work @.@

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:11:07+00:00Added an answer on May 28, 2026 at 6:11 am

    This isn’t complete, but should help you get started…

    Option Compare Database
    Option Explicit
    
    'Enter Location of your Template Here
    Const ExcelTemplate = "C:\MyTemplate.xltx"
    'Enter the Folder Directory to save results to
    Const SaveResutsFldr = "C:\Results\"
    Sub CreateWorkbook()
    Dim SaveAsStr As String
    Dim ExcelApp, WB As Object
    
    'Create Reference to Run Excel
    Set ExcelApp = CreateObject("Excel.Application")
    
    'Create Reference to your Table
    Dim T As Recordset
    Set T = CurrentDb.OpenRecordset("tblData")
    
    'Loop through all Record on Table
    While Not T.BOF And T.EOF
        'Open Your Excel Template
        Set WB = ExcelApp.Workbooks.Open(ExcelTemplate)
    
        'Enter your data from your table here to the required cells
        WB.Worksheets("NameOfYourWorkSheet").Range("A1") = T("numValue1")
        'Repeat this line for each piece of data you need entered
        'Changing the Sheet name, cell range, a field name as per your requirements
        'WB.Wor...
        'WB.Wor...
    
        'Save and Close the Workbook
        SaveAsStr = SaveResutsFldr & T("Title") & ".xlsx"
        WB.SaveAs SaveAsStr
        WB.Close
        Set WB = Nothing
    
        'Move to the Next Record
        T.MoveNext
    Wend
    
    'Close down the Excel Application
    ExcelApp.Quit
    Set ExcelApp = Nothing
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a web application project template for everyone to use here
Here's the code in question I'm trying to create a simple application - each
Ok so I am trying create a login script, here I am using PHP5
Here's my situation: I'm trying to create a SSL certificate that will be installed
I'm trying to create an access control system. Here's a stripped down example of
I am trying to create a delegate protocol for a custom UIView. Here is
I'm trying to create a layout similar to this: alt text http://img20.imageshack.us/img20/3533/stackn.png Here's the
I'm trying to create an installer-like application. Here is what its supposed to do:
I'm trying to create a large XML tree in R. Here's a simplified version
I am trying to create a reliable service on top of UDP. Here i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.