In my last post Auto refresh pivottables data in excel on first run, i found that on my first execution the query from the External data source is refreshed and takes approximately 1 min to execute. and in my second run, the pivot tables are updated.
Is there a solution (VBA code) to refresh both the External data source and pivot tables together within a time schedule (If suppose we set a timer) by clicking command button
?
AfterRefresh event
like described (or similar) to that description... than you could refresh you PT being sure your data is up to date. – Kazimierz JaworApplication.OnTime
? – Kazimierz Jaworcommand button
. when i click the button. it takes1 -2 minutes
to refresh. Instead i want to set a time like (when i click the button , within 10sec it has to refresh the data) – user42995Application.OnTime
you are able to set starting time as a difference to the moment of triggering, eg.Application.OnTime Now + TimeValue("00:00:10")
which start the action after 10 sec. – Kazimierz Jawor