Access VBA DoCmd.TransferSpreadsheet runs too slow and causes Run-time error
问题 I have a group of queries in a custom category in Access, and a bit of VBA code that gets the query names and runs them, and then copies the results for each query to a separate tab on an Excel spreadsheet. Here's the code: Private Sub Command0_Click() Dim oExcel As Object Dim oBook As Object Dim oSheet As Object Dim timestamp As String Dim path As String 'Create the Excel spreadsheet timestamp = Format(Now(), "yyyyMMddhhmmss") path = "C:\Users\username\Desktop\ValidationResults" & timestamp