Change all Workbook Connection Strings
I'm fairly new to VBA and have searched for my problem with no solution so now I'm asking the experts. My workbook has a connection in each worksheet built in Microsoft Query to return my desired results. Each Connection String is the same with varying Command Text from SQL. I'm trying to loop through each worksheet to point to a different Server name for each connection. The current connection string example is: "Driver=SQL Server;SERVER=OldServer;UID=User;Trusted_Connection=Yes;APP=Microsoft Office 2010;WSID=Workstation1"
I'm only trying to change SERVER=OldServer to SERVER=NewServer or even better if the server name can be typed in a cell and be referenced to update connection strings.
Any help is greatly appreciated.