I'm trying to create a macro to automatically update data pulled in using ODBC and the pivot tables created from it. Refresh All has to be clicked twice and while it appears in the macro three times, it only refreshes the ODBC data and not the pivot tables. Is there a way to get the macro to run the refresh twice? Here is the code I currently have.
Sheets("Inventory").Select
Application.Run "Show_Toolbar"
ActiveWorkbook.RefreshAll
Sheets("Sales").Select
Application.Run "Show_Toolbar"
ActiveWorkbook.RefreshAll
Sheets("Sales").Select
Application.Run "Show_Toolbar"
ActiveWorkbook.RefreshAll
Sheets("Inventory").Select
Application.Run "Show_Toolbar"
ActiveWorkbook.RefreshAll
Sheets("Sales").Select
Application.Run "Show_Toolbar"
ActiveWorkbook.RefreshAll
Sheets("Sales").Select
Application.Run "Show_Toolbar"
ActiveWorkbook.RefreshAll