JET/ACE opening workbook in other version of Excel

I have Office 2010 (32-bit) and Office 2013 (64-bit) installed on one system.
They were both operating fine separately.
Then the other day Office 2013 says there are some updates to install, I agreed and let it install the updates. Now when I execute the following VBA code in Excel 2010, it opens the workbook in Excel 2013, and runs my query against that rather than the workbook that I already have open.

Set conn = New ADODB.Connection
conn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & ThisWorkbook.FullName & ";Extended Properties='Excel 12.0;HDR=YES';"

Other things have occurred, such as Excel 2013 is now default opening all Excel Workbooks.

I tried setting Excel 2010 (C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE) to default using "Set Associations", but Excel 2013 is still opening them.

Right-click a file and choose open with... and select

C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE

Opens it in Excel 2013

If I manually run

C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE

it opens Excel 2010.

I have to manually start Excel 2010 and open the file in there. But, then the VBA code opens it in 2013.

How can I fix this?

Upvotes: 0

Views: 87

Answers (1)

After working with it a bit more, I decided to try a Office 2010 Repair.

Start "Programs and Features" Right click on Office 2010, Change, the repair. Required a reboot, and all seems well now.

I suppose another option would be a system restore before Office 2013 was updated.

Upvotes: 0

Related Questions