Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I just found a workaround for this.
Open the worksheet and place the cursor on a cell within the cell range of the query. Press Alt-F11 to open the VBEditor. Press Ctrl-G to open the Intermediate window. Type the command: ? ActiveCell.QueryTable.Connection. The embedded connection string will be echoed back to the screen. Put double quotes around the string and update the connection information with the new server info. Move the cursor to the beginning of the connection string and insert the following in front of the string: ActiveCell.QueryTable.Connection = Move the cursor to the end of the string and press enter. This will store the updated connection string back into the worksheet. Try your query now. Repeat for any other embedded queries in your worksheet. "Aussie CPA" wrote: Hi, Can anyone tell me if it is possible to change the datasource on an ODBC query set-up within excel? Can this be done with code? If so can anyone suggest some code? Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change the ODBC data source of a pivot table | Excel Discussion (Misc queries) | |||
changing query source | Excel Worksheet Functions | |||
Changing Pivot Table Source from ODBC to .odc. | Excel Discussion (Misc queries) | |||
change odbc data source | Excel Worksheet Functions | |||
Winn98SE, Excel2000: ODBC query opens the source workbook | Excel Discussion (Misc queries) |