ExcelAtEverything
Active Member
- Joined
- Jan 30, 2021
- Messages
- 351
- Office Version
- 2019
- Platform
- Windows
Hello experts,
Is there some code I can add here to ensure that RefreshInventory completely finishes before moving on to call RefreshSales? I have RefreshInventory set to load to a pivot after all transformations are completed in Power Query, at which point there are several other queries sourcing from that pivot. I'm doing it this way because when I simply referenced the query for them all in PQ, the refresh time was about 2-3 times as long.
Thanks for any assistance!
Is there some code I can add here to ensure that RefreshInventory completely finishes before moving on to call RefreshSales? I have RefreshInventory set to load to a pivot after all transformations are completed in Power Query, at which point there are several other queries sourcing from that pivot. I'm doing it this way because when I simply referenced the query for them all in PQ, the refresh time was about 2-3 times as long.
Thanks for any assistance!
VBA Code:
Sub CallFormat()
Call RefreshInventory
Call RefreshSales
Worksheets("CRP").Activate
Range("B15").Select
MsgBox "Refresh Complete"
End Sub