Can not refresh pivot table activities

Hello @chutima_techapitunsuk
Try Refresh all by VBA code invoke activity in excel application scope
Kindly refer to this thread, you may get some idea.