Forum

Searching through a...
 
Notifications
Clear all

Searching through all queries advanced editor text

3 Posts
2 Users
0 Reactions
184 Views
(@jaryszek)
Posts: 177
Reputable Member
Topic starter
 

Hi Guys,

i have about 50 queries in PQ and do not remember where my "Table1" was used for. 
How can i find the specific string within PQ? 

It is possible?

Best,
Jacek

 
Posted : 01/01/2021 4:51 am
(@debaser)
Posts: 837
Member Moderator
 

You could use code like this:

Sub ListTable1Queries()
Dim q As WorkbookQuery
For Each q In ThisWorkbook.Queries
If InStr(1, q.Formula, """Table1""", vbTextCompare) <> 0 Then
Debug.Print q.Name
End If
Next
End Sub

 
Posted : 01/01/2021 6:03 am
(@jaryszek)
Posts: 177
Reputable Member
Topic starter
 

thank you !!

Jacek

 
Posted : 01/01/2021 6:47 am
Share: