D
Deleted member 134417
Guest
Hey guys,
Been racking my brain all day to try and solve this (supposedly easy) task.
I want to export a query into a specific worksheet in Excel.
Have tried DoCmd.TransferSpreadsheet acExport, but it appears you can't specify an existing worksheet or cell range with a query. Some have said tables only.
I want to assign this export task to a command button.
Can someone please help me out with some basic code.
The variables are:
Query name = TrainingDataQ
Excel workbook path & name = C:\Users\me\Desktop\2015\AccessExportTest.xlsm
Desired Excel worksheet = RawData
I think thats all you will need to know. The data in the query varies but would be no more than about 500 rows.
Thanks in advance
Also for the next time i want to run the export, does anyone know a code to open that same excel file and delete the data in the RawData worksheet so that i can export new data from Access?
Been racking my brain all day to try and solve this (supposedly easy) task.
I want to export a query into a specific worksheet in Excel.
Have tried DoCmd.TransferSpreadsheet acExport, but it appears you can't specify an existing worksheet or cell range with a query. Some have said tables only.
I want to assign this export task to a command button.
Can someone please help me out with some basic code.
The variables are:
Query name = TrainingDataQ
Excel workbook path & name = C:\Users\me\Desktop\2015\AccessExportTest.xlsm
Desired Excel worksheet = RawData
I think thats all you will need to know. The data in the query varies but would be no more than about 500 rows.
Thanks in advance
Also for the next time i want to run the export, does anyone know a code to open that same excel file and delete the data in the RawData worksheet so that i can export new data from Access?