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

TransferSpreadsheet method omits last row if there are headers

Status
Not open for further replies.

PCX

Technical User
Dec 17, 2000
54
US
My spreadsheet is about 250 rows. If I use the TransferSpreadsheet command and the Excel file has headers the data is added but the last row is missing.

I use a work-around by adding the last row twice at the bottom and it works fine but is difficult to get a user to know how to do this.

Is there a better way to use VBA to do this.
Or am I just missing something?

This is the code:
Code:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12Xml, "tblName", sFile, True

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top