Étienne Jean
Étienne Jean

Reputation: 21

Excel VBA reference to ACEDAO.DLL no longer working after MS Office update

I've got an VBA module in Excel that uses ACEADO.DLL ("Microsoft Office 16.0 Access database engine Object Library") to dynamically pull and push data from a Microsoft Access database.

I'm aware that this is an fairly obsolete API, but the amount of coding required to replace it with a more modern architecture is prohibitively expensive.

After a recent Office 365 update, my code stopped working. I'm getting this error message : VBA error message (it translates in English to "System Error: &H800700C1....").

Note that the VBA debugger does not pop up: the error message appears directly and the code execution stops there.

I was able to replicate the issue on several machines. All had the same Office 365 patch installed. Here are the versions of Excel and Access:

I stepped in the code and found out that it was crashing when trying to open my Access Database with an instruction such as:

  Dim engine As DAO.DBEngine
  Dim workspace As DAO.workspace
  Dim db As DAO.Database
  Dim myPath As String
  myPath = "database.accdb"
  Set engine = DAO.DBEngine 'The code crashes here
  Set workspace = engine.CreateWorkspace("", "admin", "", DAO.dbUseJet)
  Set db = workspace.OpenDatabase(myPath, , True)

Digging a bit deeper, my VBA code references the ACEADO.DLL (on my machine "C:\Program Files (x86)\Common Files\Microsoft Shared\Office16\ACEADO.dll"). This is where it gets interesing: there is no such file at this location. I don't know if anything was there before latest Office 365 upgrade, but the code used to run without issues just a week or two ago.

My questions are:

Thanks in advance!

Upvotes: 2

Views: 605

Answers (0)

Related Questions