VBA oledb open connection became slow

Nik Marien 0 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

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,872 questions
0 comments No comments
{count} votes

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.