dougf1r
asked on
VBA error when importing Excel 2010 file
I am receiving Run-time error '3170': Could not find installable ISAM when attempting to import an Excel 2010 file (.xlsx) into an Access 2010 database using this code:
The error is with the TransferSpreadsheet line and I think it relates to the acSpreadsheetType.
I also tried acSpreadsheetType21Xml (as suggested elsewhere) in addition to acSpreadsheetType14 and this gives the same error.
Suggestions for what else I can try?
Private Sub ImportSurveyP_Click()
If IsNull(Me.txtFileName) Or Len(Me.txtFileName & "") = 0 Then
MsgBox "Please select the Excel file"
Me.ImportSurveyP.SetFocus
Exit Sub
End If
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel14, "data_Flow", Me.txtFileName, True
End Sub
The error is with the TransferSpreadsheet line and I think it relates to the acSpreadsheetType.
I also tried acSpreadsheetType21Xml (as suggested elsewhere) in addition to acSpreadsheetType14 and this gives the same error.
Suggestions for what else I can try?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER