Excel macro to change external data query connections - e.g. point from one database to another

Posted by Rory on Stack Overflow See other posts from Stack Overflow or by Rory
Published on 2010-04-25T11:51:35Z Indexed on 2010/04/25 11:53 UTC
Read the original article Hit count: 236

I'm looking for a macro/vbs to update all the external data query connections to point at a different server or database. This is a pain to do manually and in versions of Excel before 2007 it sometimes seems impossible to do manually.

Anyone have a sample? I see there are different types of connections 'OLEDB' and 'ODBC', so I guess I need to deal with different formats of connection strings?

© Stack Overflow or respective owner

Related posts about excel-vba

Related posts about excel