View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Random Random is offline
external usenet poster
 
Posts: 36
Default ODBC driver file path

I know you have probably already thought of this, but if you are using
DSNs to connect, you will need to rebuild the DSN if you moved the
file. Sorry if I am stating the obvious.


On Mon, 9 Jun 2003 20:27:00 -0700, "TOMB"
wrote:

DO! No glory here. Post anywhere else? TB
-----Original Message-----
Ok,

I've been using excel to grab info out of an Access db

via msquery. I've
now moved the db to a different location.

I use the code below to change the query tables

connection string;

Sub ChangeQT()

Dim sh As Worksheet
Dim qt As QueryTable

For Each sh In ActiveWorkbook.Worksheets
For Each qt In sh.QueryTables

qt.Connection = Replace(qt.Connection, "C:", "H:")
Next qt
Debug.Print qt.Connection
' Debug.Print sh.Name
Next sh

End Sub


When I refresh the query it gives an [Microsoft]

[ODBC....] error that it
can't find the driver...[old path].

I'm trying to find out where the path to the driver is

stored so I can
change it?!

Cheers,

Job


.