Good afternoon, I am attempting to import data via excel from a program's backend. The backend automatically creates 2 spreadsheets in a workbook. Each time the excel spreadsheet is created, the name of the spreadsheet is different. I always want to import the second spreadsheet no matter what it has been named. I am using
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tblImport_PS_PRR", vrtSelectedItem, True
for the transfer. Problem, I cannot give the specific name of the spreadsheet in vba as it is always changing. The location of the spreadsheet does not change. Is there a way to specify importing the second spreadsheet in the workbook without specifying the name of the spreadsheet?
Any help would be appreciated. Thank you in advance