Hi,
I have trawled through the FAQ's and searched for similar posts but can't seem to get what i need.
I am using:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, lcQueryName, strFilePathNamE, True
...to export my query data to an existing excel workbook. Then what i need to do is sort the data and then copy and paste it to another sheet in the workbook. I have managed to do similar things bofore but only when i use the line:
DoCmd.OutputTo acExport, lcQueryName, , strFilePathNamE, True, ""
...this if i am not mistaken creates a new workbook - the problem there being that i need to use an existing workbook.
In the past i have recorded a macro in Excel and then ripped the code and put it into Access VBA then placed a snipit of code before each line to make it work. But it isn't working this time.
Any ideas?
Chris Hill
I have trawled through the FAQ's and searched for similar posts but can't seem to get what i need.
I am using:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, lcQueryName, strFilePathNamE, True
...to export my query data to an existing excel workbook. Then what i need to do is sort the data and then copy and paste it to another sheet in the workbook. I have managed to do similar things bofore but only when i use the line:
DoCmd.OutputTo acExport, lcQueryName, , strFilePathNamE, True, ""
...this if i am not mistaken creates a new workbook - the problem there being that i need to use an existing workbook.
In the past i have recorded a macro in Excel and then ripped the code and put it into Access VBA then placed a snipit of code before each line to make it work. But it isn't working this time.
Any ideas?
Chris Hill