Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
-----Original Message-----
Are you sure your query is named MyQuery? Actually, my query has no name at all, so using the number instead of the name worked much better. That at least allowed me to get the connection string - which is one step further than where I was before! So. Using some code Rob Rutherford gave me as a sample earlier, I tried the following to reset the connection: Function ChangePath() Dim str As String str = "ODBC;DSN=MS Access Database;DBQ=" str = str & "C:\Jennifer\ProjectOrganizer.mdb;" ActiveSheet.QueryTables(1).Connection = str End Function This function compiles with no errors. However, when I try to run it from the Immediate window, I get this error: "Compile error: Expected = " And obviously, it doesn't update the connection. I'm not sure where this should even be called, quite frankly, or how to set it up. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
link not updating after changing source location | Excel Discussion (Misc queries) | |||
Changing query data source | Excel Discussion (Misc queries) | |||
changing query source | Excel Worksheet Functions | |||
Changing Query source location? | Excel Programming | |||
Query source location - how do I change? | Excel Programming |