1 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Is there a more time efficient refresh all than this?

I used to use thisworkbook.refreshall but unfortunately, for whatever reason, it does not refresh my table that is connected to a query. So while, even though the refresh to the query was updated, the table itself does not reflect that update unless i right click and click refresh all..

The code below fortunately helps, but it takes 15 to 20 seconds faster than if i had just clicked right clicked the table and clicked refresh. Normally i wouldn't mind doing this, but i'm trying to make this workbook as painfree as possible for people in case they don't forget any steps:

What is it about this query below that makes it actually updates my data table instead of thisworkbook.refreshall? Any superior/faster method? thank you in advance..

Sub RefreshEverything()

Application.ScreenUpdating = False

ThisWorkbook.RefreshAll

Application.CalculateUntilAsyncQueriesDone

DoEvents

Application.ScreenUpdating = True

End Sub

submitted by /u/ThrowRA_CarlJung
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article