MatthewNYC
New Member
- Joined
- Feb 19, 2017
- Messages
- 18
Hi,
I am running the following software:
Windows 7 (64 bit)
Excel 2013 (32 bit)
Access 2016 (32 bit)
When I use the following VBA code to connect Excel 2013 to my Access 2016 database, Excel immediately crashes:
---- begin ----
Dim objConn As ADODB.Connection
Dim strDBConnection As String
strDBConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Me\Documents\MyAccessDB.accdb;Persist Security Info=False;"
Set objConn = CreateObject("ADODB.Connection")
objConn.Open strDBConnection
---- end ----
I then tried using LATE binding and unchecking the reference to "Microsoft ActiveX Data Objects 6.1 Library" in Excel 2013 and ran this code:
---- begin ----
Dim objConn As Object
Dim strDBConnection As String
strDBConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Me\Documents\MyAccessDB.accdb;Persist Security Info=False;"
Set objConn = CreateObject("ADODB.Connection")
objConn.Open strDBConnection
---- end ----
In this case Excel does not crash but reports the following error:
Method 'Open' of object '_Connection' failed
I read some message board posts that recommended installing:
Microsoft Access Database Engine 2016 Redistributable
https://www.microsoft.com/en-us/download/details.aspx?id=54920
However, this did not solve the problem.
I even tried using just about every connection string for Access from ConnectionStrings.com but none of them work.
From what I've read in the message boards (but didn't understand completely) the problem may have something to do with the fact that my Windows 7 is 64 bit and the Excel and Acess I am using are 32 bit.
My BIG concern is that I am developing a commercial Excel spreadsheet and now I'm wondering what problems my users will experience with the software depending on their version of Windows, Microsoft Office, and whether both (or one) are 32 or 64 bit.
Is there any Access Guru out there that has this all figured out?
Matthew
I am running the following software:
Windows 7 (64 bit)
Excel 2013 (32 bit)
Access 2016 (32 bit)
When I use the following VBA code to connect Excel 2013 to my Access 2016 database, Excel immediately crashes:
---- begin ----
Dim objConn As ADODB.Connection
Dim strDBConnection As String
strDBConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Me\Documents\MyAccessDB.accdb;Persist Security Info=False;"
Set objConn = CreateObject("ADODB.Connection")
objConn.Open strDBConnection
---- end ----
I then tried using LATE binding and unchecking the reference to "Microsoft ActiveX Data Objects 6.1 Library" in Excel 2013 and ran this code:
---- begin ----
Dim objConn As Object
Dim strDBConnection As String
strDBConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Me\Documents\MyAccessDB.accdb;Persist Security Info=False;"
Set objConn = CreateObject("ADODB.Connection")
objConn.Open strDBConnection
---- end ----
In this case Excel does not crash but reports the following error:
Method 'Open' of object '_Connection' failed
I read some message board posts that recommended installing:
Microsoft Access Database Engine 2016 Redistributable
https://www.microsoft.com/en-us/download/details.aspx?id=54920
However, this did not solve the problem.
I even tried using just about every connection string for Access from ConnectionStrings.com but none of them work.
From what I've read in the message boards (but didn't understand completely) the problem may have something to do with the fact that my Windows 7 is 64 bit and the Excel and Acess I am using are 32 bit.
My BIG concern is that I am developing a commercial Excel spreadsheet and now I'm wondering what problems my users will experience with the software depending on their version of Windows, Microsoft Office, and whether both (or one) are 32 or 64 bit.
Is there any Access Guru out there that has this all figured out?
Matthew