I have the following code in Excel VBA. The OpenQuery part of the code is working but the Transfer Spreadsheet part isn't giving warning
runtime error 3170 Could not find installable ISAM
Any ideas?
Set A = CreateObject("Access.Application")
A.Visible = False
A.OpenCurrentDatabase (strDatabase)
A.DoCmd.OpenQuery "myQuery"
A.DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "myTable", strTempFile, True
A.CloseCurrentDatabase
A.Quit
Set A = Nothing
The bit of code in Red is what it points to when I Debug
Any help would be appreciated.
runtime error 3170 Could not find installable ISAM
Any ideas?
Set A = CreateObject("Access.Application")
A.Visible = False
A.OpenCurrentDatabase (strDatabase)
A.DoCmd.OpenQuery "myQuery"
A.DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "myTable", strTempFile, True
A.CloseCurrentDatabase
A.Quit
Set A = Nothing
The bit of code in Red is what it points to when I Debug
Any help would be appreciated.
Last edited: