Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

transferspreadsheet from Access 2007 to Excel 2007

Status
Not open for further replies.

alexdel70

Technical User
Dec 6, 2008
2
US
I have Access 2007 and Excel 2007

I can export my tables fine from Access 2007 to Excel using DoCmd.TransferSpreadsheet. The exported sheet defaults to Excel 2003. How do I get it to default to Excel 2007. Oh and I am exported multiple tables to the same Excel file thats why I am using DoCmd.TransferSpreadsheet.
 
hi,

In your transferspreadsheet code, there is a parameter that you can specify the version of Excel you want the result to be. Check VBA HELP.

I'd be more inclined to QUERY your MS Access tavle from Excel, each on a different sheet, if that's what you intend. You'll have much more control over the outcome, unless you absolutely have to drive this from Access.

Data > Import External Data > New Database query...

Once you have a querytable inserted on a sheet, all you need to to get new data from your Access table is...

Data > Refresh.

It can even refresh on workbook open.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top