Refreshing pivot tables

M

matpj

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top