export to excel

  • Thread starter Thread starter kharpe
  • Start date Start date
K

kharpe

am attempting to export data from an access work order database to an excel
template file. I am using office 2007.

Currently I have a command button with a click event to export data from a
query. I am using the transferspreedsheet method with a defined range in
which to transfer the data too. The data is being successfully transferred,
however, every time that I do this, all of my named ranges in excel are
become messed up (the reference syntax is changed. goes from
'worksheetname'!A1:B4 to worksheetname!A1:B4). Has anyone been experiencing
similar issues? If so is there a workaround for this, or alternatively is
there a better method by which to transfer the data from access to my excel
template file.

Current VBA code is as follows

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"CostExport", "C:\Documents and Settings\Kolya\Desktop\Fleet Management
Update Template.xlsx", , "auroracost"
 
Back
Top