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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing from Excel

Status
Not open for further replies.

WaltLukeIII

Programmer
Jun 28, 2000
199
US
I am trying to import from an excel spreadsheet and I keep just getting a single empty field with a label of F1. I am using the following code<br><br>DoCmd.TransferSpreadsheet acImport, 6, _ &quot;Practice&quot;, path, True, &quot;A1:E320&quot;<br><br>where path is the name of the file<br>and practice is the name of the new table
 
Just a guess but 6 is for excel 4 I bet you have a higher version then that<br>try 8<br>6&nbsp;&nbsp;acSpreadsheetTypeExcel4<br>5&nbsp;&nbsp;acSpreadsheetTypeExcel5<br>5&nbsp;&nbsp;acSpreadsheetTypeExcel7<br>8&nbsp;&nbsp;acSpreadsheetTypeExcel97<br>
 
it gives me an erro that I used an argument that doesn't evaluate to a valid numeric value when I use the number 8 but thanks for the suggestion
 
i don't know what I did but I have gotten it to work using 6 the data that I was getting, I am not sure what it was written on and it was only letting me use read only So I copyed the data and made a new sheet and it works. Thanks for the help though<br><br>Walt III
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top