Macro_Nerd99
Board Regular
- Joined
- Nov 13, 2021
- Messages
- 61
- Office Version
- 365
I have a worksheet with several pivot tables that are connected to a timeline. However, when I click the "Refresh Pivot Tables" button that I created, the timeline is always deleted. How do I prevent this?
Here is the code connected to the button:
Here is the code connected to the button:
VBA Code:
Sub Refresh_btn_Click()
Dim PC As PivotCache
For Each PC In ActiveWorkbook.PivotCaches
PC.Refresh
Next PC
End Sub
Thanks.
[ATTACH type="full"]78076[/ATTACH]