Should be key F9, not F8.
Code as below, pls change the P-Table name as yours.
Private Sub CommandButton1_Click()
ActiveWorkbook.ActiveSheet.Calculate 'Re-Calculate worksheet.
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh 'Re-Calculate P-Table.
End Sub