VBA: Querying Access with Excel. Why so slow?

后端 未结 10 760
情话喂你
情话喂你 2021-01-18 03:24

I found this code online to query Access and input the data into excel (2003), but it is much slower than it should be:

Sub DataPull(SQLQuery, CellPaste)
Dim         


        
10条回答
  •  日久生厌
    2021-01-18 03:46

    Since you're using Access 2003, use DAO instead, it will be faster with the Jet engine.

    See http://www.erlandsendata.no/english/index.php?d=envbadacexportdao for sample code.

    Note that you should never use the "As New" keyword, as it will lead to unexpected results.

提交回复
热议问题