Shortmeister1
Board Regular
- Joined
- Feb 19, 2008
- Messages
- 204
- Office Version
- 365
- 2016
- 2013
- 2010
- 2007
- 2003 or older
- Platform
- Windows
Hi
I've never really played around with Power Query before. I've written a large number of queries and someone very helpful has gone and moved the database to a different server.
I would normally think that you would declare an object variable (let's call it qry) and then run a loop something like:
Well nothing is ever that simple. It doesn't work and the macro recorder doesn't give anything useful up easily.
So...how do I loop through all the qry objects, identifying each one with the express purpose of changing the server name from one SQL database to a different one.
Thanks
Martin
I've never really played around with Power Query before. I've written a large number of queries and someone very helpful has gone and moved the database to a different server.
I would normally think that you would declare an object variable (let's call it qry) and then run a loop something like:
Code:
"For Each qry In Activeworkbook.queries"
Well nothing is ever that simple. It doesn't work and the macro recorder doesn't give anything useful up easily.
So...how do I loop through all the qry objects, identifying each one with the express purpose of changing the server name from one SQL database to a different one.
Thanks
Martin