ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Refreshing pivot tables (https://www.excelbanter.com/excel-programming/356525-refreshing-pivot-tables.html)

matpj[_47_]

Refreshing pivot tables
 

I have a pivot table which I am refreshing in my macro.

it seemed to work fine, but today it has started returning an error:

"Run-time Error '1004'
[Microsoft][ODBC Microsoft Access Driver] The connection for viewin
your linked Microsoft Excel worksheet was lost."

If I refresh it manually, there doesn't seem to be any problem.

the bit of code that is refreshing is:
ActiveSheet.PivotTables("PivotTable1").PivotCache. Refresh

can anyone suggest what is wrong?

thanks in advance,
Mat

--
matp
-----------------------------------------------------------------------
matpj's Profile: http://www.excelforum.com/member.php...fo&userid=2107
View this thread: http://www.excelforum.com/showthread.php?threadid=52441



All times are GMT +1. The time now is 07:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com