View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
alpder[_2_] alpder[_2_] is offline
external usenet poster
 
Posts: 1
Default Method 'OPEN' error on some PCs


I inherited some programs written by a previous employee. We hav
recently upgraded all our PCs from NT4 to XP SP2 and have upgrade
Office97 to Office2003. The code connects an Excel spreadsheet to a
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 b
properly installed."

I checked the VB references, and the ones checked on both the computer
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

--
alpde
-----------------------------------------------------------------------
alpder's Profile: http://www.excelforum.com/member.php...fo&userid=2854
View this thread: http://www.excelforum.com/showthread.php?threadid=48749