Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
open database method tjh Excel Programming 2 November 18th 04 10:19 PM
Open method used Herminio Excel Programming 10 September 12th 04 03:10 PM
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed Frank Jones Excel Programming 2 June 15th 04 03:21 AM
Workbook Open method Gwen[_2_] Excel Programming 2 June 2nd 04 05:53 PM
Open Method disabling Macros Bryan Steffen Excel Programming 0 July 16th 03 01:34 PM


All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"