mountainredrockdog
New Member
- Joined
- Mar 5, 2015
- Messages
- 5
I have a spreadsheet which includes multipe queries that connect to the same "live" database via an ODBC connection. There are multiple sheets in the workbook; each sheet pulls a different query from the same "live" database using the same ODBC connection.
My goal is to allow a user to toggle between the "live" and "beta" databases via a macro. Specifically: I have successfully created VBA to change the ODBC connection string (i.e. old string with new string) for each query on each sheet and it functions properly. I would now like to use VBA to loop through all sheets and replace the word "live.dbo" with "beta.dbo" in the query command text for each query or queries included on each sheet. Is this possible?
My goal is to allow a user to toggle between the "live" and "beta" databases via a macro. Specifically: I have successfully created VBA to change the ODBC connection string (i.e. old string with new string) for each query on each sheet and it functions properly. I would now like to use VBA to loop through all sheets and replace the word "live.dbo" with "beta.dbo" in the query command text for each query or queries included on each sheet. Is this possible?