Forum

Power Query vba tha...
 
Notifications
Clear all

Power Query vba that refreshes queries in order

4 Posts
2 Users
0 Reactions
79 Views
(@cbenitez)
Posts: 45
Trusted Member
Topic starter
 

Hi

Please see attached illustration.
Is there any vba that could run these queries in a particular order?
ConsultantCombined first then GPOS_.....afterwards?

Please advise.

Thanks in advance

Cele Workbook-Queries.jpg

 
Posted : 19/01/2018 11:35 am
(@catalinb)
Posts: 1937
Member Admin
 

Hi Celeste,

The code for refreshing a query is simple:

 

Sheets("Sheet 1 Name").ListObjects("Table1 Name").QueryTable.Refresh BackgroundQuery:=False
Sheets("Sheet 2 Name").ListObjects("Table2 Name").QueryTable.Refresh BackgroundQuery:=False
 
Posted : 20/01/2018 4:43 am
(@cbenitez)
Posts: 45
Trusted Member
Topic starter
 

Catalin, it worked. You are the BEST!! LaughLaughLaughLaughLaugh

A billion thanks!!!!!!!!

Celeste

 
Posted : 20/01/2018 11:41 am
(@catalinb)
Posts: 1937
Member Admin
 

Glad to hear you're happy with the solution 🙂

 
Posted : 20/01/2018 2:00 pm
Share: