VBA: Querying Access with Excel. Why so slow?

后端 未结 10 748
情话喂你
情话喂你 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:53

    I don't know if it will help, but I am using VBA and ADO to connect to an Excel spreadsheet.

    It was retrieving records lightning-fast (<5 seconds), but then all of a sudden it was awfully slow (15 seconds to retrieve one record). This is what lead me to your post.

    I realized I accidentally had the Excel file open myself (I had been editing it).

    Once I closed it, all was lightening fast again.

提交回复
热议问题