ADO.Open crashes Excel 2010

reinht 21 Reputation points
2021-08-21T09:52:46.517+00:00

My Excel VBA application has to run from Excel 2010. But recently the following code will crash Excel 2010. Excel 2019/365 is working.

'\Reference: Microsoft ActiveX Data Object 6.1 Library
Sub Excel2010Crash()

  '\This line will crash Excel 2010
  ADODB.Connection.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\JohnDoe\Documents\AnyDatabase.accdb"

End Sub

"C:\Program Files (x86)\Common Files\System\ado\msado15.dll" is version 10.0.19041.746.

Any ideas to overcome this issue?

TIA
Reinhard

Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | Excel | For business | Windows
Developer technologies | Visual Basic for Applications
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 90,686 Reputation points
    2021-08-21T10:01:17.973+00:00

    From Google, there are threads about the connection string, like :
    Excel 2010 crashes when attempting to open ADODB.Connection


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.