I have a problem here with the new Office 2019. The Microsoft help pages have absolutely no relevant information about it. Looks like the same connection string that was used in Office 2010 does not work with 2019 anymore. On machine running the Office 2010 it works perfectly, but on the one running Office 2019 I get run-time error 3704 - operation is not allowed when the object is closed.
The connection string is
objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & ThisWorkbook.FullName & _
";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"";"
Any ideas? I suspect that the OLEDB provider version might have changed, but can't find anything in this aspect in Microsoft documentation.