Data dump to Excel

  • Thread starter Thread starter Keith
  • Start date Start date
K

Keith

I have created a macro to dump data from 12 different
queries into 12 different Excel files. That part works
great.
I have another Excel file (in the same folder) that is
linked to each of these files. However, it will not read
the updated info in these files unless I manually open
each of the 12 files. What do I need to do to to make my
Excel file read the data from the 12 files without opening
each of the files?

Thank you.
 
Keith,

Why not dump the data from all 12 queries into the same excel file using
12 different tabs?

The code I use works pretty good:

docmd.Transferspreadsheet acExport, 8, "Query1Name", "Path to Excel
Worksheet.xls"
docmd.Transferspreadsheet acExport, 8, "Query2Name", "Path to Excel
Worksheet.xls"
docmd.Transferspreadsheet acExport, 8, "Query3Name", "Path to Excel
Worksheet.xls"
etc....

It will create a worksheet within the same excel file for each of your
queries using the name of the query as the sheet name.
 
Do you have cell formulas that aren't recalculating? You can change
data in a closed workbook but cell formulas based on the data will not
recalculate until the workbook is physically opened in the Excel app.
Excel has a 'calculation engine' which doesn't kick in until Excel is
started.
 
Back
Top