View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John F. Collins John F. Collins is offline
external usenet poster
 
Posts: 4
Default Method 'OPEN' error on some PCs

I don't know what ADODB is, but I had similar troubles with ODBC set up.
The driver names had to match exactly as used in the calling program. I
needed to add duplicate drivers with names like

Microsoft Access
MS Access
MSAccess
Microsoft Access Driver

all using the same actual driver, just named differently.

Don't know if that helps.

John

"alpder" wrote in
message ...

I inherited some programs written by a previous employee. We have
recently upgraded all our PCs from NT4 to XP SP2 and have upgraded
Office97 to Office2003. The code connects an Excel spreadsheet to an
Access database and extracts data from the mdb file
This program works perfectly on some PCs but not others.
Can anyone tell me where to start looking?

Dim DB As ADODB.Connection
Set DB = New ADODB.Connection
Dim RS As ADODB.Recordset
Sheets("Calculation").Activate
sFile = "P:\datareg.mdb"
DB.Open "Driver=Microsoft Access Driver (*.mdb);DBQ=" & sFile

The error I get is:
"Run-time error '3706': Provider cannot be found. It may not be
properly installed."

I checked the VB references, and the ones checked on both the computers
that can and cannot run the application have the following:

Visual Basic for Applications
Microsoft Excel 11.0 Onject library
Microsoft Forms 2.0 Object library
Microsoft ActiveX Data Objects 2.0 Library

I would be very grateful for any assistance.


--
alpder
------------------------------------------------------------------------
alpder's Profile:

http://www.excelforum.com/member.php...o&userid=28547
View this thread: http://www.excelforum.com/showthread...hreadid=487491