M
matpj
Hi,
I have a spreadsheet that has a pivot table on it.
If I right-click and refresh, it seems to refresh without error.
if I try to refresh it with VBA using ths code:
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
I get the error:
"Run time error 1004: [Microsoft][ODBC Access Driver] The connection
for viewing your linked Microsoft Excel worksheet was lost"
ALSO if I try to use VBA to select from the page field drop down using
this code:
ActiveSheet.PivotTables("PivotTable1").PivotFields("FOB").CurrentPage =
"hdw"
(i'm trying to select hdw from the page field drop down)
the error I get is:
"Unable to set the _Default property of the PivotItem Class"
can anyone help?
when I do these manually I don't get any errors.
thanks,
Matt
I have a spreadsheet that has a pivot table on it.
If I right-click and refresh, it seems to refresh without error.
if I try to refresh it with VBA using ths code:
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
I get the error:
"Run time error 1004: [Microsoft][ODBC Access Driver] The connection
for viewing your linked Microsoft Excel worksheet was lost"
ALSO if I try to use VBA to select from the page field drop down using
this code:
ActiveSheet.PivotTables("PivotTable1").PivotFields("FOB").CurrentPage =
"hdw"
(i'm trying to select hdw from the page field drop down)
the error I get is:
"Unable to set the _Default property of the PivotItem Class"
can anyone help?
when I do these manually I don't get any errors.
thanks,
Matt