VBA code to update connections (query) and pivot tables in excel in order and not simultaneously

41 views Asked by At

is there a way to execute code in VBA line by line and not simultaneously?

I'm very new to VBA, I'm a very basic user but I need it to automate some task at work.

Basically, I need to write a code that:

  1. update web queries (I have sheets containing tables with data that could possibly be updated daily, so I need it to update every time I use the worksheet)
  2. [optional] a msgbox that tells the update occurred
  3. update a pivot table (already set-up) in a different worksheet

Any idea? Thanks a lot

I have recorded a macro that update in order every webquery connection and only after I update the pivot table, but it seems VBA doesn't respect my order of tasks

0

There are 0 answers