Unable to use Microsoft.ACE.OLEDB.12.0 with Excel16 64-bit

Guinaba

Board Regular
Joined
Sep 19, 2018
Messages
217
Office Version
  1. 2016
Platform
  1. Windows
Hi guys,

I am trying to get the data from a .xlsb file using ADODB but keep getting the error below:

Run-time error '446':
Object doesn't support named arguments


I've activated the Microsoft ActiveX Data Objects 6.1 Library and I am using Excel16 64bit. Any suggestions?

VBA Code:
Sub GetDataFromClosedFile()

   Dim cn As ADODB.Connection 
   Set cn = New ADODB.Connection
   
   cn.ConnectionSting = _
        "Provider=Microsoft.ACE.OLEDB.12.0;" & _
        "Data Source=S:\Everyone\Demand Planning\Primary & VE\Woolworths\WW Daily Scan Sales\Daily Sales 20210708.xlsb;" & _
        "Extended Properties='Excel 12.0 ;HDR=YES';"
        
    cn.Open
       
    cn.Close
End Sub
 
VBA Code:
Sub GetDataFromClosedFile()

   Dim cn As ADODB.Connection
   Set cn = New ADODB.Connection
  
   cn.ConnectionSting = _

It's ConnectionString, not ConnectionSting. Not sure how that code would run, to be honest.
 
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
It's ConnectionString, not ConnectionSting. Not sure how that code would run, to be honest.
Thanks @RoryA! Good catch! I didn't see that! But still running my code (corrected) and the code from @Alex Blakenburg, now I keep getting the error:

Run-time error '-214746759 (80004005)':
Could not find installable ISAM

Here is my library, any way THANKS for trying to help me!

1625822161266.png
 
Upvote 0
Change both the Provider and Extended properties to use 12.0 not 16.0 and, as it's an xlsb format file, the extended properties should just be Excel 12.0 not Excel 12.0 Macro
 
Upvote 0
Solution
Change both the Provider and Extended properties to use 12.0 not 16.0 and, as it's an xlsb format file, the extended properties should just be Excel 12.0 not Excel 12.0 Macro
Awesome!!! It is working now @RoryA!!!! Ufff!! Finally!! Thanks a lot!!!
 
Upvote 0

Forum statistics

Threads
1,214,849
Messages
6,121,922
Members
449,056
Latest member
denissimo

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