Upgraded to Excel 2010 from 2007 With Issue

MikeDBMan

Well-known Member
Joined
Nov 10, 2010
Messages
610
I just upgraded from Excel 2007 to 2010. The code below gives me this error on the line .Open Provtxt

UPDATE ALERT: ACCESS WAS NOT COMPLETELY INSTALLED. WHEN I TRIED TO OPEN IT, IT INSTALLED AND NOW I AM GOOD TO GO. SORRY...

Run-time error '3706':
Provider cannot be found. It may not be properly installed.

Suggestions?

Code:
Sub DelYYYYPP(TheTable, YYYYPP, HowMany)
Dim ThePath, TheFile As String
Dim ProvTxt As String
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Dim MyConn As String
Dim DelTxt As String
 
If LCase(HowMany) = "all" Then
    Let DelTxt = "Delete FROM " & TheTable & " WHERE YYYYPP = " & Chr(34) & YYYYPP & Chr(34)
Else
    Let DelTxt = "Delete From " & TheTable & " WHERE `Project ID`='" & HowMany & "' AND YYYYPP='" & YYYYPP & "'"
End If
Windows("projects.xlsm").Activate
Sheets("intParam").Select
Range("thePath").Select
Let ThePath = ActiveCell.Value
Range("theFile").Select
Let TheFile = ActiveCell.Value
Let ProvTxt = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & ThePath & Application.PathSeparator & TheFile    '& ";Extended Properties=Excel 12.0 Xml;HDR=YES;"
Set cnn = New ADODB.Connection
With cnn
    .Open ProvTxt
 
    .Execute DelTxt
End With
cnn.Close
 
 
End Sub
 
Last edited:

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top