Class WorkbookQuery (Excel VBA)
An object that represents a query that was created by Power Query. Introduced in Office 2016. To use a WorkbookQuery class variable it first needs to be instantiated, for example
Dim wqy as WorkbookQuery
Set wqy = ActiveWorkbook.Queries(NameOrIndex:=1)
For Each
Here is an example of processing the WorkbookQuery items in a collection.
Dim wqyQuerie As WorkbookQuery
For Each wqyQuerie In ActiveWorkbook.Queries
Next wqyQuerie
Delete
Deletes this query and its underlying connection and removes it from the Queries collection.
Delete (DeleteConnection)
Description
The description of the query.
ActiveWorkbook.Queries(1).Description =
Formula
The Power Query M formula for the object.
ActiveWorkbook.Queries(1).Formula =
Name
The name of the query.
ActiveWorkbook.Queries(1).Name =