ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How many queries are there in my entire Excel workbook? (https://www.excelbanter.com/excel-discussion-misc-queries/83759-how-many-queries-there-my-entire-excel-workbook.html)

sjp209

How many queries are there in my entire Excel workbook?
 
Is there a way to list ALL existing queries within an Excel workbook?

Don Guillett

How many queries are there in my entire Excel workbook?
 
One way for all names
on a new sheetinsertnamepastelist

or
Sub QueryTableList()
Dim q As QueryTable
For Each sh In Worksheets
i = 3
For Each q In sh.QueryTables
'MsgBox q.Name
Cells(i, 1) = q.Name
i = i + 1
Next q
Next sh
End Sub

--
Don Guillett
SalesAid Software

"sjp209" wrote in message
...
Is there a way to list ALL existing queries within an Excel workbook?





All times are GMT +1. The time now is 02:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com