A
Angela
Hi,
I am looking for a fix in below code, probably addition to it.
I'm trying to export a query from ACCESS 2003 to EXCEL 2003.
Default out put format of query is pivot table.
I want to export same to excel. I do that each time with the export
button which generates a temp file which I have to save all the time
by naming it.
So far I have managed to export only the data sheet.
I'm stuck with the pivot table portion.
These few lines I found while browsing and changed them w.r.t. my
requirements.
Code is below:
----------------------
Public Sub TransferReport()
Dim varFileName As String
varFileName = "C:\MyFile.xls"
'EXPORT DATA
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Month
End Report", varFileName, False, "Sheet1"
End Sub
I am looking for a fix in below code, probably addition to it.
I'm trying to export a query from ACCESS 2003 to EXCEL 2003.
Default out put format of query is pivot table.
I want to export same to excel. I do that each time with the export
button which generates a temp file which I have to save all the time
by naming it.
So far I have managed to export only the data sheet.
I'm stuck with the pivot table portion.
These few lines I found while browsing and changed them w.r.t. my
requirements.
Code is below:
----------------------
Public Sub TransferReport()
Dim varFileName As String
varFileName = "C:\MyFile.xls"
'EXPORT DATA
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Month
End Report", varFileName, False, "Sheet1"
End Sub