H
hstijnen
Hi,
I've an Excel template MySheet.xlt containing a pivt table based on a query
exported from Access. In my Access module I first export the data to the xlt:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, qry1,
MySheet.xlt
and then open the template:
Set appExcel = CreateObject("Excel.Application")
Set wbk = appExcel.Workbooks.Open(MySheet.xlt)
And I get MySheet1.xls. So far OK. But the pivot table is not updated and
trying to update it manually, gives an error: Bad Pvot Table.
However, when I open the sheet by double clicking the xlt the pivot table is
updated, and all is OK.
How can I realize that in VBA?
Application.FollowHyperlink MySheet.xlt
opens the xlt directly
Thanks for help
Henk
I've an Excel template MySheet.xlt containing a pivt table based on a query
exported from Access. In my Access module I first export the data to the xlt:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, qry1,
MySheet.xlt
and then open the template:
Set appExcel = CreateObject("Excel.Application")
Set wbk = appExcel.Workbooks.Open(MySheet.xlt)
And I get MySheet1.xls. So far OK. But the pivot table is not updated and
trying to update it manually, gives an error: Bad Pvot Table.
However, when I open the sheet by double clicking the xlt the pivot table is
updated, and all is OK.
How can I realize that in VBA?
Application.FollowHyperlink MySheet.xlt
opens the xlt directly
Thanks for help
Henk