Hello everybody,
I must add queries to an automatically refreshing workbook. The original file was probably made in Excel 2003, but I'm using Excel 2007 and I don't seem to be able to gave a specific name to my queries.
First, I'll describe the behaviour of the original file. We have 39 sheets with 39 queries. Once I execute the main macro in my module, it creates an update status sheet, which tell if the refresh was succesful or not. It write the sheet name and the query name and the status of the query.
It all work well.
But now, I must add 18 new sheets and each one must have it's own query. But my problem is that if I create the sheet and select my sqlQuery for each sheet, it creates a new connection, and that connection's name is a generic one. It doesn't refelect the name of the query as it used to be.
Is there an interface to manipulate the association QueryTables per sheet ? I haven't find anything yet, and the collection is read only in VBA. I need to give it a better name.
Bookmarks