Run code after updating pivot table
So when the underlying data changes, we often spend time refreshing individual pivot tables. Today, I want to share a quick tip about how to refresh all pivot tables at once. At Chandoo.org, I have one goal, "to make you awesome in excel and charting". If multiple pivot tables are based on the same data source, you can create a slicer, and connect it to one or more of those pivot tables. Selected = False End If Next si Long exit Handler: Application. Enable Events = True Exit Sub err Handler: Msg Box "Could not update pivot table" Resume exit Handler End Sub The final step is to move the slicers -- the short list slicer will go onto the main sheet, beside the original pivot table.However, if there are pivot tables from different data sources, you can't connect the to the same slicer. The long slicer will go onto the short list sheet, where it will be updated by the code.
Other things like the height, width, top and left coordinates can be changed – either at the time of creation of the slicer or at runtime.For example, the VBA code shown below is perfectly valid and work fine: but if you try to create two slicer objects, that causes an error.