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
--
matpj
------------------------------------------------------------------------
matpj's Profile:
http://www.excelforum.com/member.php...o&userid=21076
View this thread:
http://www.excelforum.com/showthread...hreadid=514887