Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spreadsheet import error

Status
Not open for further replies.

mkov

Programmer
Sep 10, 2003
203
US
I am working on writing code to import a spreadsheet that I created. I spreadsheet has 9 columns in it and each one has its own vaildation rules. I am getting the following error when I try importing the file through code:

Run-time error '3709':
The search key was not found in any record.

This is the code I am trying to use to import the file:

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "BatchPlansTemp", "c:\temp\Plan Setup Template.xls", True

Anyone have any idea what this error really means?

Thanks in advance for your help.
 
Have you worked through importing this particular spreadsheet manually ie without VBA? That might reveal where any problems are occuring.

 
Of course not, that would have been the obvious thing to do.

I will give that a try.

Thanks.
 
The error I get using File-Get External Data is:

Script out of Range.
 
Well, I had a copy of the spreadsheet before I setup the data validation and it imported fine.

Has anyone ever tried to import a spreadsheet with data validation setup before? I wouldn't think it would make a difference, but that is the only difference that I can see in the 2 spreadsheets.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top