I have the same problem when connecting ADODB from a local Excel file to another local Excel file.
The only way I solve this is to reopen the main Excel file from which I connect. Nothing more is done, and the function works again.
My connection function:
Sub SetConReadOnly(ByRef con1 As Object, ByRef rst1 As Object, sFile As String) If con1 Is Nothing Then Set con1 = CreateObject("ADODB.Connection") If rst1 Is Nothing Then Set rst1 = CreateObject("ADODB.Recordset") con1.Open "Provider=Microsoft.ACE.OLEDB.12.0;" & _ "Data Source=" & sFile & ";" & _ "Extended Properties=""Excel 12.0;HDR=No;IMEX=1;""" End Sub
(I am using 32-bit version of Office 2013, 64-bit Windows 7)
source share