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

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,489 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,641 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 81,721 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