Dynamic Sheet Range When Importing Excel To Access

LB79

Registered User.
Local time
Today, 02:21
Joined
Oct 26, 2007
Messages
505
Hi All,

I receive an Excel workbook frequently from a third party that’s I want to import to Access using TransferSpreadsheet.
This is all well and good but the sheet I want to import has a different name everytime. The third party are unable/unwilling to amend the sheet naming process.
Currently I'm manually changing the sheet name to import but I want to stop.
The sheet is always the third in the workbook.
Is there a way I can import the 3rd sheet to Access without using a set name?
AND is there a way I can use LIKE instead of the sheet name (IE SheetName Like *Sheet*)?

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tbl_Table", ATMT_txtPath, True, "SheetName!"

Many thanks
 

Users who are viewing this thread

Back
Top Bottom