Solved

VBA error when importing Excel 2010 file

Posted on 2014-11-05
2
513 Views
Last Modified: 2014-11-05
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:

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

Open in new window


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?
0
Comment
Question by:dougf1r
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 40424499
try

DoCmd.TransferSpreadsheet acImport, 10, "data_Flow", Me.txtFileName, true
0
 
LVL 1

Author Comment

by:dougf1r
ID: 40424595
Worked great. Thanks!
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question