0
votes

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?

1
First, ADO connections open in memory. Unless you opened a COM object, then you will launch an application. Jet/ACE is a .dll data store file that doesn't see user programs. Second, why do you have two Office versions installed especially since Excel 2010 and 2013 share same file type. Now I can understand having the older Excel 2003 for compatibility purposes.Parfait
@par I develop Office applications for various clients and some require Office 2010, some require Office 2013. In the past I've had issues, where I develop the application in Office 2013, and the clients have issues running it in Office 2010. Usually issues with references.Christopher Thomas Nicodemus

1 Answers

0
votes

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.