DoCmd.TransferSpreadsheet error

pacoonejr

Board Regular
Joined
Apr 19, 2003
Messages
138
Function mPort()
DoCmd.TransferSpreadsheet acImport, 8, _
"tbl1e3d", "D:\Path\file.xls", True, "A1:N40"

End Function

this produces

Run-Time Error '2391':
Field 'F1' doesn't exist in 'tbl1e3d'

Office XP XP Proffesional
Please advize.
Thanks,
 

Some videos you may like

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

NateO

Legend
Joined
Feb 17, 2002
Messages
9,700
Try putting headers into your spreadsheet that are the equivalent of field your field names.
 

bat17

Well-known Member
Joined
Aug 15, 2003
Messages
1,470
Or if you are not using field names in Xl then change the True in your formula to False.

HTh

Peter
 

Watch MrExcel Video

Forum statistics

Threads
1,113,850
Messages
5,544,656
Members
410,627
Latest member
georgealice
Top