There is a lot of information around on how to add a querytable to an excel worksheet using VBA. I have achieved this with no prblems.
However, I now wish to access the data in the querytable and there is no informtion I can find anywhere on how to do this.
I assume the .name property of the add method can be used to identify the querytable.
The sql for the querytable itself returns rows of KPI data relating to a particular set of "reporting units", one row for each month across a series of years.
I need to access the set of rows relating to each reprting unit and copy the data (with transpose) to another sheet. Each set of rows will be seperated by filler rows into their respecive reporting units.
I have done this arkwardly but with no reference to the querytable as a named object.
Thanks
However, I now wish to access the data in the querytable and there is no informtion I can find anywhere on how to do this.
I assume the .name property of the add method can be used to identify the querytable.
The sql for the querytable itself returns rows of KPI data relating to a particular set of "reporting units", one row for each month across a series of years.
I need to access the set of rows relating to each reprting unit and copy the data (with transpose) to another sheet. Each set of rows will be seperated by filler rows into their respecive reporting units.
I have done this arkwardly but with no reference to the querytable as a named object.
Thanks