Use a macro to export a table to Excel

G

Guest

I have a macro that runs a make table query to pick up 'unmatched' data and
put this in a seperate table. After running the query the macro renames the
table to include the current date using the expression
="SUN_InRDB_NotArcade_tbl_" & Format(Date(),"ddmmyyyy"). I would then like
the macro to export this data to Excel using the new table name as the file
name. I don't want any prompts from Access as I need as little user
interaction as possible. I've looked at TransferSpreadsheet and OutputTo but
I'm not sure how to fit it all together - can anyone help? (I'm no good at
code so just using a macro is my preferred method!)
 
G

Guest

Hello,
Create a New macro with the following commands:
1) SetWarnings - No
2) OutputTo
- Indicate the Table name (objectName)
- Indicate Output Format - xls
- Indicate Output File - C:\something.xls
3) MsgBox - A message to say e.g. Output completed. File is something.xls in
C:\
Hope this will help

Ο χÏήστης "SamB" έγγÏαψε:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top