Hi,
I have 2 macros. First macro refreshes table created by Power Query. The second macro refreshes Pivot table based on the data from power query table.
I tried call function. It refreshes first table. but not the pivot table. If I press the macro button twice, it works. Please help me to refresh both tables at single click. These are my macros;
>>> use code - tags <<<
Is there any way to refresh both table in a single click ?
I tried Call Function in the first macro. But not working.
I have 2 macros. First macro refreshes table created by Power Query. The second macro refreshes Pivot table based on the data from power query table.
I tried call function. It refreshes first table. but not the pivot table. If I press the macro button twice, it works. Please help me to refresh both tables at single click. These are my macros;
>>> use code - tags <<<
Code:
'MACRO 1
'-------------
Sub LoadData()
Application.ScreenUpdating = False
Worksheets("Master").ListObjects("Table1_2").Refresh
Sheets("Packing List").Select
Range("C1").Select
Application.ScreenUpdating = True
End Sub
'MACRO 2
'-------------------
Sub Refresh1()
Application.ScreenUpdating = False
Worksheets("Packing List").PivotTables("PivotTable1").PivotCache.Refresh
Range("A:A").EntireRow.RowHeight = 26
Application.ScreenUpdating = True
End Sub
I tried Call Function in the first macro. But not working.
Last edited by a moderator: