Pivot Table refresh in VBA code not working

C

Carlos

Hi,
I'm getting an error when I try to refresh a pivot table that was created
using VBA code in Excel 2000. This the error: "Refresh method of pivot table
class failed".

Here is the piece of code:
Set ptCache.Recordset = rst
With wsSheet
Set ptTable = .PivotTables("Test")
End With
'Refresh Data.
ptTable.RefreshTable

Initially when I get the recordset and create the pivot table, every is
populated correctly. But when I need to run the refreshing code to get new
data into the pivot table, the refreshtable fail.

Any suggestion?
I will appreciate that.

Thanks,
Carlos.
 

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