Are you using named ranges in the worksheet?
For example:
- Sub zimportrangename()
-
DoCmd.TransferSpreadsheet _
-
transfertype:=acImport, _
-
spreadsheettype:=acSpreadsheetTypeExcel12, _
-
tablename:="TestInput", _
-
FileName:="C:\Users\myusername\Documents\book2.xlsm", _
-
HasFieldNames:=False, _
-
Range:="importme"
-
End Sub
Now no matter where the data is, one can simply name the range "importme" (or what have you) and the date will transfer to the table...
NOTE: you will need to validate the field values etc... which is the downfall. I usually import into a testing table that has some generic text fields and then parse the imported data for numerics etc...
Your other option is application automation wherein you could open an instance of the workbook and then search for your data... sortof kludgy though... like a 20#Maul for a carpet tack.