VBA to set up Query Group and move queries into it.

Shortmeister1

Board Regular
Joined
Feb 19, 2008
Messages
204
Office Version
  1. 365
  2. 2016
  3. 2013
  4. 2010
  5. 2007
  6. 2003 or older
Platform
  1. Windows
I never know whether to post these items under VBA or Power Query!

The macro recorder is a bit limited where Power Query is concerned. If you record the actions, the result is a blank sub. It doesn't appear to have been updated in line with the product.

Does anyone know how to set up a new group, move item in and out of groups, group/ungroup items, delete groups etc.?

Thanks
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hello,

did you solve the issue?
I am trying to order power query created in Queries & Connections pane with VBA.

But i suppose it is not possible.

Best,
Jacek
 
Upvote 0
Hello,

did you solve the issue?
I am trying to order power query created in Queries & Connections pane with VBA.

But i suppose it is not possible.

Best,
Jacek
Hi Jaryszek

Only in a very limited way. The underlying query object can be referenced, but the reality is that there isn't a huge amount that you can do with it as they haven't updated VBA to include the Power Query object model.

Saying that, my Power Query knowledge is infinitely better than the extremely limited knowledge I had last year. Everything on my original list can be done within Power Query without any VBA.

You can also add parameters to a group of cells which will take effect when you click refresh.

Best regards
Martin
 
Upvote 0

Forum statistics

Threads
1,215,734
Messages
6,126,543
Members
449,316
Latest member
sravya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top