What's the error?
That would suggest that the pivot table name in the code doesn't match the name of the actual pivot.
The only way to get that message is if the named pivot table is not on the specified sheet. So there has to be a mismatch somewhere.
Have you tried recording the Refresh button and seeing how it refers to the pivot table?