Article ID: 115190
Article Last Modified on 1/19/2007
In Microsoft Access 7.0 or 97:
Function ImportXL5 ()
DoCmd.TransferSpreadsheet _
acImport,5,"TestTable","C:\T.XLS",True,"Sheet5!"
End Function
In Microsoft Access 2.0:
Function ImportXL5 ()
DoCmd TransferSpreadsheet _
A_IMPORT,5,"TestTable","C:\T.XLS",True,"Sheet5!"
End Function
If you do not specify a value for the last argument, Microsoft Access will
import the first worksheet that it finds in the workbook. If you specify a
range, that range will be imported from the first worksheet in the
workbook. To specify a range from a specific worksheet, use the syntax in
the following example:
Sheet5!R2C1:R15C5
Keywords: kbinfo kbinterop kbprogramming KB115190