Sub activateGetPivotData() Application.GenerateGetPivotData = True End Sub Sub deactivateGetPivotData() Application.GenerateGetPivotData = False End Sub
Get Pivot Data:
To disable/enable GetPivotData function you need to use Excel option. But with this code you can do it in a single click.