R
rfuscjr via AccessMonster.com
I can open my Excel template, refresh all my sheets and save the file to a
specified location all via an MsAccess module that runs after I refresh some
tables that act as the sorce for the spreadsheet. Now I want to add a line
of code to default a value in the pivot table, I want to default FiscalYear
to 2005 as part of the process. I recorded some Excel code to do this:
(xcelapp.ActiveSheet.PivotTables("PivotTable1").PivotFields("BaNbr").
PivotItem = "2005") but it does not work when I execute the module. Its says
it can not set the pivot property. Any ideas what the appropriate code
should look like?
specified location all via an MsAccess module that runs after I refresh some
tables that act as the sorce for the spreadsheet. Now I want to add a line
of code to default a value in the pivot table, I want to default FiscalYear
to 2005 as part of the process. I recorded some Excel code to do this:
(xcelapp.ActiveSheet.PivotTables("PivotTable1").PivotFields("BaNbr").
PivotItem = "2005") but it does not work when I execute the module. Its says
it can not set the pivot property. Any ideas what the appropriate code
should look like?