VBA oledb open connection became slow

Nik Marien 5 Reputation points
2025-06-08T12:49:38.67+00:00

In my VBA project the opening of the OLEDB-connection has become really slow.
(In the past it worked fast but since some months it has become slow.)

It takes 13 seconds to just open the connection.

I have tried this with only this coding in my project and only 1 row of data in my excel-sheets so there is no issue regarding big data or complex querying.

This is my code :

Sub ShowData()

Dim connection As New ADODB.connection

'Opening connection

connection.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & ThisWorkbook.FullName & _

";Extended Properties=""Excel 12.0;HDR=YES;"";"

'Closing connection'

connection.Close

End Sub

Developer technologies | VB
{count} votes

1 answer

Sort by: Most helpful
  1. Nik Marien 5 Reputation points
    2025-07-30T18:27:03.0166667+00:00

    I could not reduce the responstime of the connection opening.
    As a solution I removed the queries and replaced them with ListObjects (as suggested in one of the comments). And since I don't need the connection for this my issue has been solved via a bypass.

    Thank you for the follow up. :-)

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.