Copying Query into Excel spreadsheet

  • Thread starter Thread starter Adam
  • Start date Start date
A

Adam

Hi,

Trying to create a macro which is triggered after the user presses an
"update" button. The macro is to copy the data from a query
(qryPlanesDisplay) and paste the data onto fixed point on a datasheet
template (i.e. paste on A6). Data paste should be data only. Datasheet will
be stored for example in "My Documents" folder on desktop.

When another user does the same function after "updating" some information,
the macro should perform the same function and overwrite the existing
spreadsheet without being asked to overwrite.

Can this be done? Please help. Thanks in advance.
 
See these articles for examples of doing what you seek.

Write Data From a Recordset into an EXCEL Worksheet using Automation (VBA)
http://www.accessmvp.com/KDSnell/EXCEL_Export.htm#WriteRstFile


Write Data From a Recordset into an EXCEL Worksheet using EXCEL's
CopyFromRecordset (VBA)
http://www.accessmvp.com/KDSnell/EXCEL_Export.htm#ExpCopyFromRst


Using the Range Argument of TransferSpreadsheet when Exporting Data to an
EXCEL File (VBA)
http://www.accessmvp.com/KDSnell/EXCEL_Export.htm#ExpRange
 
Back
Top